]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: determine availability of __fpending()
authorSami Kerola <kerolasa@iki.fi>
Mon, 23 Apr 2012 12:26:23 +0000 (14:26 +0200)
committerSami Kerola <kerolasa@iki.fi>
Mon, 23 Apr 2012 12:26:23 +0000 (14:26 +0200)
Needed to for making Cygwin more possible.

Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656
Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
configure.ac
include/closestream.h

index 0c203fa8b77a04511ef8eb53259bf0bf5f9395ea..56f378ebbcd4f8b32643ee6cc97f87cb0aedc204 100644 (file)
@@ -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 \
index fb507eab8e105aef201c5ab51c3459332a56d658..d61b83b5ec4c7da22abad642d3612943940000d8 100644 (file)
@@ -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)
 {