bug-gnulib
[Top][All Lists]
Advanced

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

Re: OpenBSD: gettimeofday and sys/time.h errors


From: Paul Eggert
Subject: Re: OpenBSD: gettimeofday and sys/time.h errors
Date: Fri, 09 Aug 2013 13:46:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Thanks, does the following patch fix things for you?
If so, I'll install it into gnulib.

diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 28a3dac..061ebaf 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -19,14 +19,16 @@
 # endif
 @PRAGMA_COLUMNS@
 
-/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
+/* On many BSDish systems, <sys/types.h> and <sys/time.h>
    both include <sys/select.h>.
    On Cygwin, <sys/time.h> includes <sys/select.h>.
    Simply delegate to the system's header in this case.  */
 #if (@HAVE_SYS_SELECT_H@                                                \
      && ((defined __osf__ && defined _SYS_TYPES_H_                      \
-          && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H         \
+          && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H        \
           && defined _OSF_SOURCE)                                       \
+         || ((defined __FreeBSD__ || defined __OpenBSD__)               \
+             && defined _SYS_TYPES_H && __BSD_VISIBLE)                  \
          || (defined __sun && defined _SYS_TYPES_H                      \
              && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE)   \
                  || defined __EXTENSIONS__))))
@@ -39,6 +41,9 @@
            || (defined __osf__ && defined _SYS_TIME_H_                  \
                && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H    \
                && defined _OSF_SOURCE)                                  \
+           || (defined __FreeBSD__ && defined _SYS_TIME_H)              \
+           || (defined __OpenBSD__ && defined _SYS_TIME_H               \
+               && 420 <= __XPG_VISIBLE && __XPG_VISIBLE < 600)          \
            || (defined __sun && defined _SYS_TIME_H                     \
                && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
                    || defined __EXTENSIONS__))))



reply via email to

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