Files
haikuports/net-misc/wget/patches/wget-1.12.patch

106 lines
3.3 KiB
Diff

diff -urN wget-1.12/configure.ac wget-1.12-haiku/configure.ac
--- wget-1.12/configure.ac 2009-09-22 09:39:49.038010880 -0700
+++ wget-1.12-haiku/configure.ac 2010-10-22 13:23:29.351797248 -0700
@@ -163,6 +163,7 @@
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)
AC_CHECK_DECLS(h_errno,,,[#include <netdb.h>])
diff -urN wget-1.12/m4/wget.m4 wget-1.12-haiku/m4/wget.m4
--- wget-1.12/m4/wget.m4 2009-09-21 20:18:44.034340864 -0700
+++ wget-1.12-haiku/m4/wget.m4 2010-10-22 13:22:01.071041024 -0700
@@ -117,6 +117,8 @@
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,9 @@
AC_CHECK_LIB(nsl, $wget_check_in_nsl)
fi
AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(bind, gethostbyname)
+ AC_CHECK_LIB(network, gethostbyname)
+ AC_CHECK_LIB(network, socket)
])
diff -urN wget-1.12/src/config.h.in wget-1.12-haiku/src/config.h.in
--- wget-1.12/src/config.h.in 2009-09-22 09:40:33.008126464 -0700
+++ wget-1.12-haiku/src/config.h.in 2010-10-22 13:14:25.000000000 -0700
@@ -66,6 +66,9 @@
/* Define to 1 if you have the <bp-sym.h> header file. */
#undef HAVE_BP_SYM_H
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
/* Define when using built-in MD5. */
#undef HAVE_BUILTIN_MD5
@@ -212,12 +215,18 @@
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
+/* 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
/* Define if you have the gnutls library. */
#undef HAVE_LIBGNUTLS
+/* 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 -urN wget-1.12/src/connect.c wget-1.12-haiku/src/connect.c
--- wget-1.12/src/connect.c 2009-09-21 19:55:56.006815744 -0700
+++ wget-1.12-haiku/src/connect.c 2010-10-22 13:14:25.000000000 -0700
@@ -45,7 +45,7 @@
# include <netdb.h>
# endif /* def __VMS [else] */
# include <netinet/in.h>
-# ifndef __BEOS__
+# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
# endif
#endif /* not WINDOWS */
diff -urN wget-1.12/src/host.c wget-1.12-haiku/src/host.c
--- wget-1.12/src/host.c 2009-09-21 20:00:05.002883584 -0700
+++ wget-1.12-haiku/src/host.c 2010-10-22 13:14:25.000000000 -0700
@@ -39,7 +39,7 @@
# include <sys/types.h>
# include <sys/socket.h>
# include <netinet/in.h>
-# ifndef __BEOS__
+# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
# endif
# ifdef __VMS
diff -urN wget-1.12/src/host.h wget-1.12-haiku/src/host.h
--- wget-1.12/src/host.h 2009-09-04 09:31:54.006553600 -0700
+++ wget-1.12-haiku/src/host.h 2010-10-22 13:14:25.000000000 -0700
@@ -41,9 +41,9 @@
# endif /* def __VMS [else] */
# include <sys/socket.h>
# include <netinet/in.h>
-#ifndef __BEOS__
-# include <arpa/inet.h>
-#endif
+# ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
#endif
struct url;