From: Sami Kerola Date: Mon, 23 Apr 2012 12:26:23 +0000 (+0200) Subject: build-sys: determine availability of __fpending() X-Git-Tag: v2.22-rc1~459^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78288764e48b570659e951a6c84a49e625733bc1;p=thirdparty%2Futil-linux.git build-sys: determine availability of __fpending() Needed to for making Cygwin more possible. Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656 Reported-by: Bernhard Voelker Signed-off-by: Sami Kerola --- diff --git a/configure.ac b/configure.ac index 0c203fa8b7..56f378ebbc 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 ]) AC_CHECK_FUNCS([ \ + __fpending \ __secure_getenv \ err \ errx \ diff --git a/include/closestream.h b/include/closestream.h index fb507eab8e..d61b83b5ec 100644 --- a/include/closestream.h +++ b/include/closestream.h @@ -2,12 +2,22 @@ #define UTIL_LINUX_CLOSESTREAM_H #include +#ifdef HAVE_STDIO_EXT_H #include +#endif #include #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) {