From 8c57f7ed0818b46f93a8376cfef6305194f811d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 9 Aug 2008 14:16:54 +0000 Subject: [PATCH] Apply the patch I made to have it build on BeOS, doesn't hurt and fixes a warning about missing inet_ntoa proto. Patch at http://revolf.free.fr/beos/patches/wget-1.11.4-beos-haiku.diff.txt git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26898 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/network/wget/configure.in | 1 + src/bin/network/wget/m4/wget.m4 | 4 ++++ src/bin/network/wget/src/config.h.in | 9 +++++++++ src/bin/network/wget/src/connect.c | 2 +- src/bin/network/wget/src/host.c | 2 +- src/bin/network/wget/src/host.h | 6 +++--- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/bin/network/wget/configure.in b/src/bin/network/wget/configure.in index e75ff81afb..d0d069a695 100644 --- a/src/bin/network/wget/configure.in +++ b/src/bin/network/wget/configure.in @@ -163,6 +163,7 @@ AC_HEADER_STDBOOL AC_CHECK_HEADERS(unistd.h sys/time.h) AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h) AC_CHECK_HEADERS(stdint.h inttypes.h pwd.h wchar.h) +AC_CHECK_HEADERS(arpa/inet.h) dnl dnl Check sizes of integer types. These are used to find n-bit diff --git a/src/bin/network/wget/m4/wget.m4 b/src/bin/network/wget/m4/wget.m4 index d0c20b3546..f30785b798 100644 --- a/src/bin/network/wget/m4/wget.m4 +++ b/src/bin/network/wget/m4/wget.m4 @@ -117,6 +117,8 @@ AC_DEFUN([WGET_POSIX_CLOCK], [ dnl Check whether we need to link with -lnsl and -lsocket, as is the dnl case on e.g. Solaris. +dnl BeOS (BONE) needs libbind as well +dnl Haiku needs libnetwork AC_DEFUN([WGET_NSL_SOCKET], [ dnl On Solaris, -lnsl is needed to use gethostbyname. But checking @@ -136,6 +138,8 @@ AC_DEFUN([WGET_NSL_SOCKET], [ AC_CHECK_LIB(nsl, $wget_check_in_nsl) fi AC_CHECK_LIB(socket, socket) + AC_CHECK_LIB(bind, gethostbyname) + AC_CHECK_LIB(network, gethostbyname) ]) diff --git a/src/bin/network/wget/src/config.h.in b/src/bin/network/wget/src/config.h.in index f296c3cdf2..166cfdaedd 100644 --- a/src/bin/network/wget/src/config.h.in +++ b/src/bin/network/wget/src/config.h.in @@ -30,6 +30,9 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + /* Define when using built-in MD5. */ #undef HAVE_BUILTIN_MD5 @@ -72,6 +75,9 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY +/* Define to 1 if you have the `bind' library (-lbind). */ +#undef HAVE_LIBBIND + /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL @@ -81,6 +87,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H +/* Define to 1 if you have the `network' library (-lnetwork). */ +#undef HAVE_LIBNETWORK + /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL diff --git a/src/bin/network/wget/src/connect.c b/src/bin/network/wget/src/connect.c index 6714576241..244b1cc793 100644 --- a/src/bin/network/wget/src/connect.c +++ b/src/bin/network/wget/src/connect.c @@ -41,7 +41,7 @@ as that of the covered work. */ # include # include # include -# ifndef __BEOS__ +# ifdef HAVE_ARPA_INET_H # include # endif #endif /* not WINDOWS */ diff --git a/src/bin/network/wget/src/host.c b/src/bin/network/wget/src/host.c index fb5a2cbfa1..3bf18a0762 100644 --- a/src/bin/network/wget/src/host.c +++ b/src/bin/network/wget/src/host.c @@ -38,7 +38,7 @@ as that of the covered work. */ #ifndef WINDOWS # include # include -# ifndef __BEOS__ +# ifdef HAVE_ARPA_INET_H # include # endif # include diff --git a/src/bin/network/wget/src/host.h b/src/bin/network/wget/src/host.h index 5141a6f7d2..44a0bdb007 100644 --- a/src/bin/network/wget/src/host.h +++ b/src/bin/network/wget/src/host.h @@ -37,9 +37,9 @@ as that of the covered work. */ # include # include # include -#ifndef __BEOS__ -# include -#endif +# ifdef HAVE_ARPA_INET_H +# include +# endif #endif struct url;