#! /bin/sh /usr/share/dpatch/dpatch-run # fix FTPFS for GNU/Hurd @DPATCH@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/client/dhclient.c isc-dhcp-4.1.1-P1/client/dhclient.c --- isc-dhcp-4.1.1-P1~/client/dhclient.c 2011-03-03 01:10:28.000000000 +0000 +++ isc-dhcp-4.1.1-P1/client/dhclient.c 2011-03-03 01:11:08.000000000 +0000 @@ -342,21 +342,33 @@ * to be reopened after chdir() has been called */ if (path_dhclient_db[0] != '/') { - char *path = dmalloc(PATH_MAX, MDL); + char *path; +#ifdef __GLIBC__ + path = realpath(path_dhclient_db, NULL); +#else + path = dmalloc(PATH_MAX, MDL); if (path == NULL) log_fatal("No memory for filename\n"); - path_dhclient_db = realpath(path_dhclient_db, path); - if (path_dhclient_db == NULL) - log_fatal("%s: %s", path, strerror(errno)); + path = realpath(path_dhclient_db, path); +#endif + if (path == NULL) + log_fatal("%s: %s", path_dhclient_db, strerror(errno)); + path_dhclient_db = path; } if (path_dhclient_script[0] != '/') { - char *path = dmalloc(PATH_MAX, MDL); + char *path; +#ifdef __GLIBC__ + path = realpath(path_dhclient_script, NULL); +#else + path = dmalloc(PATH_MAX, MDL); if (path == NULL) log_fatal("No memory for filename\n"); - path_dhclient_script = realpath(path_dhclient_script, path); - if (path_dhclient_script == NULL) - log_fatal("%s: %s", path, strerror(errno)); + path = realpath(path_dhclient_script, path); +#endif + if (path == NULL) + log_fatal("%s: %s", path_dhclient_script, strerror(errno)); + path_dhclient_script = path; } /* first kill off any currently running client */ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/common/lpf.c isc-dhcp-4.1.1-P1/common/lpf.c --- isc-dhcp-4.1.1-P1~/common/lpf.c 2011-03-03 01:06:44.000000000 +0000 +++ isc-dhcp-4.1.1-P1/common/lpf.c 2011-03-03 01:11:08.000000000 +0000 @@ -28,7 +28,6 @@ #include "dhcpd.h" #if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE) -#include #include #include @@ -39,8 +38,14 @@ #include "includes/netinet/ip.h" #include "includes/netinet/udp.h" #include "includes/netinet/if_ether.h" +#endif + +#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR) +#include #include +#endif +#if defined (USE_LPF_SEND) || defined (USE_LPF_RECEIVE) /* Reinitializes the specified interface after an address change. This is not required for packet-filter APIs. */ @@ -411,7 +416,9 @@ interface_dereference (&fbi, MDL); } } +#endif +#if defined (USE_LPF_RECEIVE) || defined (USE_LPF_HWADDR) void get_hw_addr(const char *name, struct hardware *hw) { int sock; @@ -442,18 +449,22 @@ memcpy(&hw->hbuf[1], sa->sa_data, 6); break; case ARPHRD_IEEE802: +#ifndef __GNU__ #ifdef ARPHRD_IEEE802_TR case ARPHRD_IEEE802_TR: #endif /* ARPHRD_IEEE802_TR */ +#endif hw->hlen = 7; hw->hbuf[0] = HTYPE_IEEE802; memcpy(&hw->hbuf[1], sa->sa_data, 6); break; +#ifndef __GNU__ case ARPHRD_FDDI: hw->hlen = 17; hw->hbuf[0] = HTYPE_FDDI; memcpy(&hw->hbuf[1], sa->sa_data, 16); break; +#endif default: log_fatal("Unsupported device type %ld for \"%s\"", (long int)sa->sa_family, name); diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/configure.ac isc-dhcp-4.1.1-P1/configure.ac --- isc-dhcp-4.1.1-P1~/configure.ac 2011-03-03 01:10:44.000000000 +0000 +++ isc-dhcp-4.1.1-P1/configure.ac 2011-03-03 01:11:36.000000000 +0000 @@ -366,9 +366,17 @@ AC_CHECK_HEADER(net/bpf.h, DO_BPF=1) if test -n "$DO_BPF" then - AC_DEFINE([HAVE_BPF], [""], + AC_DEFINE([HAVE_BPF], [1], [Define to 1 to use the Berkeley Packet Filter interface code.]) + else + AC_CHECK_HEADER(sys/socket.h, DO_SOCKET=1) + if test -n "$DO_SOCKET" + then + AC_DEFINE([HAVE_SOCKETS], [1], + [Define to 1 to use the + standard BSD socket API.]) + fi fi fi fi diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/includes/osdep.h isc-dhcp-4.1.1-P1/includes/osdep.h --- isc-dhcp-4.1.1-P1~/includes/osdep.h 2011-03-03 01:06:44.000000000 +0000 +++ isc-dhcp-4.1.1-P1/includes/osdep.h 2011-03-03 01:13:23.000000000 +0000 @@ -90,6 +90,8 @@ # define USE_LPF 1 # elif defined(HAVE_DLPI) # define USE_DLPI 1 +# elif defined(HAVE_SOCKETS) +# define USE_SOCKETS 1 # endif #endif @@ -116,6 +118,8 @@ # define USE_SOCKET_RECEIVE # if defined(HAVE_DLPI) # define USE_DLPI_HWADDR +# else +# define USE_LPF_HWADDR # endif #endif diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' isc-dhcp-4.1.1-P1~/server/dhcpd.c isc-dhcp-4.1.1-P1/server/dhcpd.c --- isc-dhcp-4.1.1-P1~/server/dhcpd.c 2011-03-03 01:06:44.000000000 +0000 +++ isc-dhcp-4.1.1-P1/server/dhcpd.c 2011-03-03 01:11:08.000000000 +0000 @@ -449,12 +449,18 @@ * to be reopened after chdir() has been called */ if (path_dhcpd_db[0] != '/') { - char *path = dmalloc(PATH_MAX, MDL); + char *path; +#ifdef __GLIBC__ + path = realpath(path_dhcpd_db, NULL); +#else + path = dmalloc(PATH_MAX, MDL); if (path == NULL) log_fatal("No memory for filename\n"); - path_dhcpd_db = realpath(path_dhcpd_db, path); - if (path_dhcpd_db == NULL) - log_fatal("%s: %s", path, strerror(errno)); + path = realpath(path_dhcpd_db, path); +#endif + if (path == NULL) + log_fatal("%s: %s", path_dhcpd_db, strerror(errno)); + path_dhcpd_db = path; } if (!quiet) {