From dcf1fcc0405ed9d74f73a2cde910aa0ce95bd777 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 5 Nov 2008 07:58:46 +0000 Subject: [PATCH] Make #inclusion of conditional on autoconf telling us it exists. agedu now builds on OS X. git-svn-id: svn://svn.tartarus.org/sgt/agedu@8279 cda61777-01e9-0310-a592-d414129be87e --- config.h | 1 + configure.ac | 2 +- du.c | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 95d89c0..27135bd 100644 --- a/config.h +++ b/config.h @@ -13,3 +13,4 @@ */ #define HAVE_LSTAT64 +#define HAVE_FEATURES_H diff --git a/configure.ac b/configure.ac index e1cc6c5..8117e81 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PROG_INSTALL AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h termios.h unistd.h]) +AC_CHECK_HEADERS([arpa/inet.h fcntl.h features.h limits.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h termios.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/du.c b/du.c index 9a8a4a3..1a375bf 100644 --- a/du.c +++ b/du.c @@ -2,8 +2,12 @@ * du.c: implementation of du.h. */ +#include "agedu.h" /* for config.h */ + +#ifdef HAVE_FEATURES_H #define _GNU_SOURCE #include +#endif #include #include @@ -14,7 +18,6 @@ #include #include -#include "agedu.h" #include "du.h" #include "alloc.h" -- 2.11.0