summaryrefslogtreecommitdiffstats
path: root/include/closestream.h
diff options
context:
space:
mode:
authorSami Kerola2012-04-23 14:26:23 +0200
committerSami Kerola2012-04-23 14:26:23 +0200
commit78288764e48b570659e951a6c84a49e625733bc1 (patch)
tree16d0206a6fde5385f74d4428f6f0d70d8386373e /include/closestream.h
parentlogin: use get_fd_tabsize() (diff)
downloadkernel-qcow2-util-linux-78288764e48b570659e951a6c84a49e625733bc1.tar.gz
kernel-qcow2-util-linux-78288764e48b570659e951a6c84a49e625733bc1.tar.xz
kernel-qcow2-util-linux-78288764e48b570659e951a6c84a49e625733bc1.zip
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 <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/closestream.h')
-rw-r--r--include/closestream.h10
1 files changed, 10 insertions, 0 deletions
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)
{