From b35a2d568a62155077252c3487a44fa988f34d80 Mon Sep 17 00:00:00 2001 From: Ian Ray Date: Thu, 23 May 2013 21:03:34 +0300 Subject: [PATCH] Conditionally include sys/sysctl.h --- configure.ac | 2 +- expand.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 34f25e1f4..31675186f 100644 --- a/configure.ac +++ b/configure.ac @@ -511,7 +511,7 @@ LIBS=$LIBS_COMMON # Check presense of various header files # -AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h]) +AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h]) if test x$local_gettext != xno; then AC_CHECK_HEADERS([libintl.h]) diff --git a/expand.cpp b/expand.cpp index 74e501027..6dfa9e448 100644 --- a/expand.cpp +++ b/expand.cpp @@ -18,7 +18,9 @@ parameter expansion. #include #include #include +#ifdef HAVE_SYS_SYSCTL_H #include +#endif #include #include #include