summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-06-15 13:26:14 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-06-15 13:26:14 +0200
commitefac498d689122d0e6246cfe48dd85d0541f5ff4 (patch)
tree9f93e976d9719a8c974a7b17af2f6b5d2cb99779
parent4079ed17db3a3f73bf5c88f6c093e376a93424bb (diff)
downloadATCD-efac498d689122d0e6246cfe48dd85d0541f5ff4.tar.gz
Only include os_sysctl.h when ACE_HAS_SYSCTL has been defined and with linux kernel >= 5.5.0 sys/sysctl.h has been marked deprecated
* ACE/ace/OS_NS_unistd.cpp: * ACE/ace/config-linux-common.h:
-rw-r--r--ACE/ace/OS_NS_unistd.cpp4
-rw-r--r--ACE/ace/config-linux-common.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index f316b888c51..563e385fffd 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -13,7 +13,9 @@
#include "ace/Object_Manager_Base.h"
#include "ace/Auto_Ptr.h"
#include "ace/os_include/sys/os_pstat.h"
-#include "ace/os_include/sys/os_sysctl.h"
+#if defined (ACE_HAS_SYSCTL)
+# include "ace/os_include/sys/os_sysctl.h"
+#endif /* ACE_HAS_SYSCTL */
#if defined ACE_HAS_VXCPULIB
# include "vxCpuLib.h"
diff --git a/ACE/ace/config-linux-common.h b/ACE/ace/config-linux-common.h
index c0fb656c321..6f0a560002e 100644
--- a/ACE/ace/config-linux-common.h
+++ b/ACE/ace/config-linux-common.h
@@ -252,4 +252,8 @@
# define ACE_HAS_GETTID // See ACE_OS::thr_gettid()
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION (5,5,0))
+# define ACE_LACKS_SYS_SYSCTL_H
#endif
+
+#endif /* ACE_CONFIG_LINUX_COMMON_H */