From 9ec3fe85ad7eebd96024997ae8b2429a4c9d0f1d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Feb 2012 14:56:18 +0100 Subject: [PATCH] * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is currently being included, just include the system's . 2012-02-04 Bruno Haible sys_select: Avoid syntax error on OpenBSD 5.0. --- ChangeLog | 6 ++++++ lib/sys_select.in.h | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 26c317e77..b0b03aef8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2012-02-04 Bruno Haible sys_select: Avoid syntax error on OpenBSD 5.0. + * lib/sys_select.in.h [OpenBSD]: When /usr/include/pthread.h is + currently being included, just include the system's . + +2012-02-04 Bruno Haible + + sys_select: Avoid syntax error on OpenBSD 5.0. * lib/sys_select.in.h: Include only after the include_next , not before. Reported by Jiri B . diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 96edb3ddd..e002843f3 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, includes , which includes + . At this point we cannot include , 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 -- 2.11.0