mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
72 lines
1.7 KiB
Plaintext
72 lines
1.7 KiB
Plaintext
From 9d7fd73efaf1c5a0a0fdc085af7015fd2978d495 Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sun, 30 Apr 2017 16:59:12 +0200
|
|
Subject: [PATCH] Add check for <sys/select.h> and use it
|
|
|
|
POSIX says it's required for 'fd_set', and Haiku needs it.
|
|
---
|
|
config.h.in | 3 +++
|
|
configure.in | 2 +-
|
|
src/mms.c | 3 +++
|
|
src/mmsh.c | 3 +++
|
|
4 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/config.h.in b/config.h.in
|
|
index 8a8fc8f..7cf91ce 100644
|
|
--- a/config.h.in
|
|
+++ b/config.h.in
|
|
@@ -30,6 +30,9 @@
|
|
/* Define to 1 if you have the <string.h> header file. */
|
|
#undef HAVE_STRING_H
|
|
|
|
+/* Define to 1 if you have the <sys/select.h> header file. */
|
|
+#undef HAVE_SYS_SELECT_H
|
|
+
|
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
|
#undef HAVE_SYS_SOCKET_H
|
|
|
|
diff --git a/configure.in b/configure.in
|
|
index 86b0e08..9dccc63 100755
|
|
--- a/configure.in
|
|
+++ b/configure.in
|
|
@@ -13,7 +13,7 @@ AC_PROG_LIBTOOL
|
|
AC_PROG_INSTALL
|
|
|
|
dnl Checks for header files.
|
|
-AC_CHECK_HEADERS([sys/socket.h netinet/in.h netdb.h windows.h winsock2.h])
|
|
+AC_CHECK_HEADERS([sys/select.h sys/socket.h netinet/in.h netdb.h windows.h winsock2.h])
|
|
|
|
case $host in
|
|
*beos*)
|
|
diff --git a/src/mms.c b/src/mms.c
|
|
index c1dbc29..1a0aff7 100644
|
|
--- a/src/mms.c
|
|
+++ b/src/mms.c
|
|
@@ -52,6 +52,9 @@
|
|
#endif
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
+#ifdef HAVE_SYS_SELECT_H
|
|
+#include <sys/select.h>
|
|
+#endif
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <errno.h>
|
|
diff --git a/src/mmsh.c b/src/mmsh.c
|
|
index a019f05..6562ce2 100755
|
|
--- a/src/mmsh.c
|
|
+++ b/src/mmsh.c
|
|
@@ -55,6 +55,9 @@
|
|
#endif
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
+#ifdef HAVE_SYS_SELECT_H
|
|
+#include <sys/select.h>
|
|
+#endif
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <errno.h>
|
|
--
|
|
2.19.1
|
|
|