From 58f4af7973e3d2ec0510050ea207e6b16c6c9a64 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Dec 2004 22:28:10 +0000 Subject: [PATCH] Marcin Konicki provided two configure fixes and a source fix to make curl build out-of-the-box on BeOS. --- CHANGES | 4 ++++ acinclude.m4 | 4 +--- configure.ac | 10 ++++++++++ lib/select.c | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 33f9a2055..754f72480 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,10 @@ Changelog +Daniel (22 December 2004) +- Marcin Konicki provided two configure fixes and a source fix to make curl + build out-of-the-box on BeOS. + Daniel (21 December 2004) - Added test case 217 that verified CURLINFO_HTTP_CONNECTCODE, and I made the -w option support 'http_connect' to make it easier to verify! diff --git a/acinclude.m4 b/acinclude.m4 index f232438a8..552e6c810 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -87,9 +87,7 @@ AC_DEFINE(HAVE_IOCTLSOCKET_CASE, 1, [use Ioctlsocket() for non-blocking sockets] dnl Ioctlsocket didnt compile, do test 5! AC_TRY_COMPILE([ /* headers for SO_NONBLOCK test (BeOS) */ -#include -#include -#include +#include ],[ /* SO_NONBLOCK source code */ long b = 1; diff --git a/configure.ac b/configure.ac index a03be2026..60747e6c5 100644 --- a/configure.ac +++ b/configure.ac @@ -314,6 +314,16 @@ then ) fi +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the net lib - for BeOS + AC_CHECK_LIB(net, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="$LIBS -lnet" + ]) +fi + + if test "$HAVE_GETHOSTBYNAME" = "1"; then AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname]) else diff --git a/lib/select.c b/lib/select.c index c66095dde..8b6a8ce5c 100644 --- a/lib/select.c +++ b/lib/select.c @@ -39,6 +39,11 @@ #include "select.h" +#ifdef __BEOS__ +/* BeOS has FD_SET defined in socket.h */ +#include +#endif + #ifdef WIN32 #define VALID_SOCK(s) (1) /* Win-sockets are not in range [0..FD_SETSIZE> */ #else