From 21f368b9b7bc8f540923b6f897e03c80cd526d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 14 Jul 2018 15:24:53 +0200 Subject: configure: add proper check for fd_set.bits diff --git a/configure.ac b/configure.ac index 51d77bd..48f627f 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,28 @@ case $host_os in *) fds_bits_found=false;; esac +if test "x$fds_bits_found" = xfalse ; then + AC_CHECK_MEMBER(fd_set.bits, + [ + fds_bits_found=plain_simple + USE_FDS_BITS="bits" + ],, + [ + #ifdef HAVE_SYS_PARAM_H + #include + #endif + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_SYS_TIME_H + #include + #endif + #ifdef HAVE_SYS_SELECT_H + #include + #endif + ]) +fi + if test "x$fds_bits_found" = xfalse ; then AC_CHECK_MEMBER(fd_set.fds_bits, [ -- 2.16.4 From b7590df866d76c0abf87f3c68197263d6bf03043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 14 Jul 2018 15:26:34 +0200 Subject: Assume Haiku uses POSIX thread safe functions diff --git a/include/X11/Xos_r.h b/include/X11/Xos_r.h index f963b64..f8b727b 100644 --- a/include/X11/Xos_r.h +++ b/include/X11/Xos_r.h @@ -88,6 +88,10 @@ in this Software without prior written authorization from The Open Group. # endif #endif /* _XOS_R_H */ +#ifdef __HAIKU__ +#define _POSIX_THREAD_SAFE_FUNCTIONS +#endif + #ifndef WIN32 #ifdef __cplusplus -- 2.16.4 From 60f1b23ba452203e5bbe39a824865a861d52208a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 14 Jul 2018 15:29:54 +0200 Subject: Haiku only has POSIX-mandated passwd fields diff --git a/include/X11/Xos_r.h b/include/X11/Xos_r.h index f8b727b..970f37d 100644 --- a/include/X11/Xos_r.h +++ b/include/X11/Xos_r.h @@ -252,7 +252,7 @@ typedef struct { */ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \ - defined(__APPLE__) || defined(__DragonFly__) + defined(__APPLE__) || defined(__DragonFly__) || defined(__HAIKU__) static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p) { memcpy(&(p).pws, (p).pwp, sizeof(struct passwd)); -- 2.16.4