diff options
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/use-__fpending.patch | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series index c524d3e..98b6f03 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ debian-9.4.3-2.patch config-illumos.patch undefine-SHARED-if-defined.patch +use-__fpending.patch diff --git a/debian/patches/use-__fpending.patch b/debian/patches/use-__fpending.patch new file mode 100644 index 0000000..b23fb04 --- /dev/null +++ b/debian/patches/use-__fpending.patch @@ -0,0 +1,36 @@ +Description: Supported in GLIBC and in Solaris libc +Index: icon/ipl/cfuncs/fpoll.c +=================================================================== +--- icon.orig/ipl/cfuncs/fpoll.c 2003-01-10 17:48:57.000000000 +0000 ++++ icon/ipl/cfuncs/fpoll.c 2013-01-28 06:15:30.654169575 +0000 +@@ -29,6 +29,7 @@ + */ + + #include <stdio.h> ++#include <stdio_ext.h> + #include <sys/types.h> + #include <sys/time.h> + +@@ -57,21 +58,8 @@ + msec = IntegerVal(argv[2]); + } + +- /* check for data already in buffer */ +- /* there's no legal way to do this in C; we cheat */ +-#if defined(__GLIBC__) && defined(_STDIO_USES_IOSTREAM) /* new GCC library */ +- if (f->_IO_read_ptr < f->_IO_read_end) ++ if (__fpending(f)) + RetArg(1); +-#elif defined(__GLIBC__) /* old GCC library */ +- if (f->__bufp < f->__get_limit) +- RetArg(1); +-#elif defined(_FSTDIO) /* new BSD library */ +- if (f->_r > 0) +- RetArg(1); +-#else /* old AT&T library */ +- if (f->_cnt > 0) +- RetArg(1); +-#endif + + /* set up select(2) structure */ + FD_ZERO(&fds); /* clear file bits */ |