summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2009-04-30 18:42:52 +0000
committerDavid Hankins <dhankins@isc.org>2009-04-30 18:42:52 +0000
commita57df74a1a4c7de76d35b99edb48d465d55cc345 (patch)
treeb7c06a38aa16e9cec5c7b13adb72d2edf0168279 /common
parent62f6843db628274e875b6c3f8f087a54b879977a (diff)
downloadisc-dhcp-a57df74a1a4c7de76d35b99edb48d465d55cc345.tar.gz
- Compilation on Solaris with USE_SOCKETS defined in includes/site.h has
been repaired. Other USE_ overrides should work better. [ISC-Bugs #19434] - A check for the local flavor of IFNAMSIZ had a broken 'else' condition, that probably still resulted in the correct behaviour (but wouldn't use a larger defined value provided by the host OS). [ISC-Bugs #19434]
Diffstat (limited to 'common')
-rw-r--r--common/discover.c2
-rw-r--r--common/dlpi.c15
2 files changed, 13 insertions, 4 deletions
diff --git a/common/discover.c b/common/discover.c
index f2df447a..77a4e7a9 100644
--- a/common/discover.c
+++ b/common/discover.c
@@ -184,7 +184,7 @@ isc_result_t interface_initialize (omapi_object_t *ipo,
#ifndef IF_NAMESIZE
# if defined(LIFNAMSIZ)
# define IF_NAMESIZE LIFNAMSIZ
-# elseif defined(IFNAMSIZ)
+# elif defined(IFNAMSIZ)
# define IF_NAMESIZE IFNAMSIZ
# else
# define IF_NAMESIZE 16
diff --git a/common/dlpi.c b/common/dlpi.c
index 56f6b3a9..4d2f7734 100644
--- a/common/dlpi.c
+++ b/common/dlpi.c
@@ -87,7 +87,8 @@
#include "dhcpd.h"
-#if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE)
+#if defined (USE_DLPI_SEND) || defined (USE_DLPI_RECEIVE) || \
+ defined(USE_DLPI_HWADDR)
# include <sys/ioctl.h>
# include <sys/time.h>
@@ -149,6 +150,10 @@ static int dlpiokack PROTO ((int fd, char *bufp));
static int dlpiinfoack PROTO ((int fd, char *bufp));
static int dlpiphysaddrack PROTO ((int fd, char *bufp));
static int dlpibindack PROTO ((int fd, char *bufp));
+#if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
+/* These functions are not used if we're only sourcing the get_hw_addr()
+ * function (for USE_SOCKETS).
+ */
static int dlpiunitdatareq PROTO ((int fd, unsigned char *addr,
int addrlen, unsigned long minpri,
unsigned long maxpri, unsigned char *data,
@@ -161,7 +166,7 @@ static int dlpiunitdataind PROTO ((int fd,
unsigned long *grpaddr,
unsigned char *data,
int datalen));
-
+#endif /* !USE_DLPI_HWADDR: USE_DLPI_SEND || USE_DLPI_RECEIVE */
static int expected PROTO ((unsigned long prim, union DL_primitives *dlp,
int msgflags));
static int strgetmsg PROTO ((int fd, struct strbuf *ctlp,
@@ -1090,6 +1095,7 @@ int dlpiphysaddrack (fd, bufp)
return 0;
}
+#if defined(USE_DLPI_SEND) || defined(USE_DLPI_RECEIVE)
int dlpiunitdatareq (fd, addr, addrlen, minpri, maxpri, dbuf, dbuflen)
int fd;
unsigned char *addr;
@@ -1207,6 +1213,7 @@ static int dlpiunitdataind (fd, daddr, daddrlen,
return data.len;
}
+#endif /* !USE_DLPI_HWADDR: USE_DLPI_RECEIVE || USE_DLPI_SEND */
/*
* expected - see if we got what we wanted.
@@ -1298,6 +1305,7 @@ static int strgetmsg (fd, ctlp, datap, flagsp, caller)
return 0;
}
+#if defined(USE_DLPI_SEND)
int can_unicast_without_arp (ip)
struct interface_info *ip;
{
@@ -1331,6 +1339,7 @@ void maybe_setup_fallback ()
interface_dereference (&fbi, MDL);
}
}
+#endif /* USE_DLPI_SEND */
void
get_hw_addr(const char *name, struct hardware *hw) {
@@ -1414,4 +1423,4 @@ get_hw_addr(const char *name, struct hardware *hw) {
close(sock);
}
-#endif /* USE_DLPI */
+#endif /* USE_DLPI_SEND || USE_DLPI_RECEIVE || USE_DLPI_HWADDR */