bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

<sys/select.h> on OSF/1


From: Bruno Haible
Subject: <sys/select.h> on OSF/1
Date: Sun, 28 Sep 2008 17:03:37 +0200
User-agent: KMail/1.5.4

On OSF/1 4.0, <sys/select.h> exists but provides only a forward declaration
of 'struct timeval', no definition of this type. This leads to this error:


cc -nodtk -O -std -std -DHAVE_CONFIG_H -I. -I..  -I. -I.  -I.. -I./..  
-I../gnulib-lib -I./../gnulib-lib  
-I/nfs/visu/telecom/users/haible/gnu/arch/alpha4/include   -c test-sys_select.c
cc: Error: test-sys_select.c, line 193: In this declaration, "tv0" has no 
linkage and is of an incomplete type.
  static struct timeval tv0;
------------------------^


I'm applying this stopgap measure. Of course it would be better to work
around this problem in the sys_select module, rather than in the test. Feel
free to do so if you have time for it.


2008-09-28  Bruno Haible  <address@hidden>

        * doc/posix-headers/sys_select.texi: Mention 'struct timeval' problem.
        * tests/test-sys_select.c: Include <sys/time.h>, for struct timeval.
        Needed on OSF/1 4.0.

--- doc/posix-headers/sys_select.texi.orig      2008-09-28 16:55:56.000000000 
+0200
+++ doc/posix-headers/sys_select.texi   2008-09-28 16:50:23.000000000 +0200
@@ -17,4 +17,7 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
address@hidden
+This header file does not define @code{struct timeval} on some platforms:
+OSF/1 4.0.
 @end itemize
--- tests/test-sys_select.c.orig        2008-09-28 16:55:56.000000000 +0200
+++ tests/test-sys_select.c     2008-09-28 16:51:03.000000000 +0200
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/select.h>
+#include <sys/time.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <fcntl.h>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]