Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zftp module problem



I'm just rebuilding a dynamic zsh 3.1.5-pws-XX for the first time in quite
a while, and I just ran into a compilation problem with zftp.c:

../../../zsh-3.1.5/Src/Modules/zftp.c: In function `zftp_test':
../../../zsh-3.1.5/Src/Modules/zftp.c:2071: storage size of `pfd' isn't known
../../../zsh-3.1.5/Src/Modules/zftp.c:2086: `POLLNORM' undeclared (first use this function)

My system (Linux, RedHat 4.2, libc5, yes I know it's old) HAS_POLL and
HAS_SELECT but does not have struct pollfd, POLLIN, or POLLNORM defined.

The following is a rather brute-force correction.

Index: Src/Modules/zftp.c
===================================================================
diff -u -r1.5 zftp.c
--- zftp.c	1999/03/29 21:46:03	1.5
+++ zftp.c	1999/04/30 10:08:54
@@ -2067,7 +2067,7 @@
 {
 #if defined(HAVE_POLL) || defined(HAVE_SELECT)
     int ret;
-# ifdef HAVE_POLL
+# if defined(HAVE_POLL) && (defined(POLLIN) || defined(POLLNORM))
     struct pollfd pfd;
 # else
     fd_set f;
@@ -2077,7 +2077,7 @@
     if (zcfd == -1)
 	return 1;
 
-# ifdef HAVE_POLL
+# if defined(HAVE_POLL) && (defined(POLLIN) || defined(POLLNORM))
 #  ifndef POLLIN
     /* safety first, though I think POLLIN is more common */
 #   define POLLIN POLLNORM

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author