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 23:18:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

On 08/09/2013 04:13 PM, Mike Miller wrote:
> I get pretty much the same errors if I don't include the select
> gnulib module, and pull in only gettimeofday.

Hmm, OK, how about the following patch instead?

diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index 09c9601..90dd02b 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -24,11 +24,12 @@
 #endif
 @PRAGMA_COLUMNS@
 
-/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
+   recursively via <sys/select.h>.
    Simply delegate to the system's header in this case; it is a no-op.
    Without this extra ifdef, the C++ gettimeofday declaration below
    would be a forward declaration in gnulib's nested <sys/time.h>.  */
-#ifdef _CYGWIN_SYS_TIME_H
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
 # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
 #else
 




reply via email to

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