diff options
author | Bruno Haible <bruno@clisp.org> | 2012-02-04 14:56:18 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-02-04 14:56:18 +0100 |
commit | 9ec3fe85ad7eebd96024997ae8b2429a4c9d0f1d (patch) | |
tree | 5447e245de802a6f005666150cdbc4f1ca87f414 /lib/sys_select.in.h | |
parent | 2bcfa56c2934e858594b8cdf52020af169b03814 (diff) | |
download | gnulib-9ec3fe85ad7eebd96024997ae8b2429a4c9d0f1d.tar.gz |
* lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is
currently being included, just include the system's <sys/select.h>.
2012-02-04 Bruno Haible <bruno@clisp.org>
sys_select: Avoid syntax error on OpenBSD 5.0.
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r-- | lib/sys_select.in.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 96edb3ddde..e002843f34 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -42,6 +42,15 @@ # define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_BSD_TYPES_H # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ +/* On OpenBSD 5.0, <pthread.h> includes <sys/types.h>, which includes + <sys/select.h>. At this point we cannot include <signal.h>, because that + includes gnulib's pthread.h override, which gives a syntax error because + /usr/include/pthread.h has not been completely processed. Simply delegate + to the system's header in this case. */ +#elif @HAVE_SYS_SELECT_H@ && defined __OpenBSD__ && (defined _PTHREAD_H_ && !defined PTHREAD_MUTEX_INITIALIZER) + +# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + #else #ifndef _@GUARD_PREFIX@_SYS_SELECT_H |