From 4e80e7c5725665b3bafef4fcead53e20131b5369 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 30 Mar 2003 08:59:24 +0000 Subject: [PATCH] In IRIX 5.3 the cc is awfully confused about the prototype of select(). p4raw-id: //depot/perl@19086 --- hints/irix_5.sh | 6 +++++- pp_sys.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hints/irix_5.sh b/hints/irix_5.sh index f895bcc..70ea24f 100644 --- a/hints/irix_5.sh +++ b/hints/irix_5.sh @@ -12,7 +12,11 @@ i_time='define' case "$cc" in *gcc*) ccflags="$ccflags -D_BSD_TYPES" ;; -*) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000" ;; +*) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000" +# Otherwise the cc thinks that a struct timeval * is not equivalent to +# a struct timeval *. Yeah, you read that right. +pp_sys_cflags='ccflags="$ccflags -DPERL_IRIX5_SELECT_TIMEVAL_VOID_CAST"' + ;; esac lddlflags="-shared" diff --git a/pp_sys.c b/pp_sys.c index 5c8fd07..3c22a76 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1073,6 +1073,9 @@ PP(pp_sselect) (Select_fd_set_t) fd_sets[1], (Select_fd_set_t) fd_sets[2], (Select_fd_set_t) fd_sets[3], +#ifdef PERL_IRIX5_SELECT_TIMEVAL_VOID_CAST + (void*) /* Workaround for a compiler bug. */ +#endif tbuf); for (i = 1; i <= 3; i++) { if (fd_sets[i]) { -- 2.7.4