aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-18 19:16:46 -0800
committerChris Robinson <[email protected]>2014-01-18 19:16:46 -0800
commit748be9a97d2b4489beef2e41e9776ec5e13e6f14 (patch)
tree55cd8b2316a129eef129b79e9aac9fbff23eddcd
parent1a90c7f498491b85985f46c18463730f492535a8 (diff)
Include sys/sysconf.h if available for sysconf()
-rw-r--r--Alc/helpers.c3
-rw-r--r--CMakeLists.txt1
-rw-r--r--config.h.in3
3 files changed, 7 insertions, 0 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c
index 30c5537e..f8a5f13b 100644
--- a/Alc/helpers.c
+++ b/Alc/helpers.c
@@ -61,6 +61,9 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,
#ifdef HAVE_CPUID_H
#include <cpuid.h>
#endif
+#ifdef HAVE_SYS_SYSCONF_H
+#include <sys/sysconf.h>
+#endif
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc33a771..ff746764 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -315,6 +315,7 @@ CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(pri
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
CHECK_INCLUDE_FILE(strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
+CHECK_INCLUDE_FILE(sys/sysconf.h HAVE_SYS_SYSCONF_H)
CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H)
CHECK_INCLUDE_FILE(ieeefp.h HAVE_IEEEFP_H)
diff --git a/config.h.in b/config.h.in
index 17c69f3b..d9582e74 100644
--- a/config.h.in
+++ b/config.h.in
@@ -122,6 +122,9 @@
/* Define if we have cpuid.h */
#cmakedefine HAVE_CPUID_H
+/* Define if we have sys/sysconf.h */
+#cmakedefine HAVE_SYS_SYSCONF_H
+
/* Define if we have guiddef.h */
#cmakedefine HAVE_GUIDDEF_H