diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/closestream.h | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0c203fa8b..56f378ebb 100644 --- a/configure.ac +++ b/configure.ac @@ -152,6 +152,7 @@ AC_CHECK_HEADERS([ \ pty.h \ security/pam_misc.h \ stdint.h \ + stdio_ext.h \ stdlib.h \ sys/disk.h \ sys/disklabel.h \ @@ -245,6 +246,7 @@ AC_CHECK_DECL([lseek64], #include <unistd.h>]) AC_CHECK_FUNCS([ \ + __fpending \ __secure_getenv \ err \ errx \ diff --git a/include/closestream.h b/include/closestream.h index fb507eab8..d61b83b5e 100644 --- a/include/closestream.h +++ b/include/closestream.h @@ -2,12 +2,22 @@ #define UTIL_LINUX_CLOSESTREAM_H #include <stdio.h> +#ifdef HAVE_STDIO_EXT_H #include <stdio_ext.h> +#endif #include <unistd.h> #include "c.h" #include "nls.h" +#ifndef HAVE___FPENDING +static inline int +__fpending(FILE *stream __attribute__((__unused__))) +{ + return 0; +} +#endif + static inline int close_stream(FILE * stream) { |