summaryrefslogtreecommitdiff
path: root/libexec/bootpd
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2001-10-14 21:39:54 +0000
committerIan Dowse <iedowse@FreeBSD.org>2001-10-14 21:39:54 +0000
commita0522bc2d0d7f4a541a2163fb9f57ef26f9c4dcf (patch)
treeb1c86467647bdb6095c901b3db991efb5e498120 /libexec/bootpd
parente73b7e52282070129c0b7e4020a1d4b2699d0618 (diff)
Notes
Diffstat (limited to 'libexec/bootpd')
-rw-r--r--libexec/bootpd/dumptab.c4
-rw-r--r--libexec/bootpd/getether.c4
-rw-r--r--libexec/bootpd/tools/bootptest/print-bootp.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c
index 5fa832098062..0fe31b47a8e4 100644
--- a/libexec/bootpd/dumptab.c
+++ b/libexec/bootpd/dumptab.c
@@ -34,9 +34,11 @@
#define P(args) ()
#endif
+#ifdef DEBUG
static void dump_generic P((FILE *, struct shared_bindata *));
static void dump_host P((FILE *, struct host *));
static void list_ipaddresses P((FILE *, struct in_addr_list *));
+#endif
#undef P
@@ -262,7 +264,7 @@ dump_host(fp, hp)
/* NetBSD: domainname (see above) */
/* NetBSD: dumpfile (see above) */
if (hp->flags.time_offset) {
- fprintf(fp, "\\\n\t:to=%ld:", hp->time_offset);
+ fprintf(fp, "\\\n\t:to=%ld:", (long)hp->time_offset);
}
if (hp->flags.time_server) {
fprintf(fp, "\\\n\t:ts=");
diff --git a/libexec/bootpd/getether.c b/libexec/bootpd/getether.c
index 071b5fcd40b1..da582e98ebfe 100644
--- a/libexec/bootpd/getether.c
+++ b/libexec/bootpd/getether.c
@@ -19,6 +19,7 @@
#include <ctype.h>
#include <paths.h>
+#include <string.h>
#include <syslog.h>
#include "getether.h"
@@ -117,13 +118,14 @@ getether(ifname, eap)
#include <net/if_dl.h>
#include <net/if_types.h>
+int
getether(ifname, eap)
char *ifname; /* interface name from ifconfig structure */
char *eap; /* Ether address (output) */
{
int fd, rc = -1;
register int n;
- struct ifreq ibuf[16], ifr;
+ struct ifreq ibuf[16];
struct ifconf ifc;
register struct ifreq *ifrp, *ifend;
diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c
index 977a32dd4165..9ea450e10d90 100644
--- a/libexec/bootpd/tools/bootptest/print-bootp.c
+++ b/libexec/bootpd/tools/bootptest/print-bootp.c
@@ -120,7 +120,7 @@ bootp_print(bp, length, sport, dport)
printf(" hops:%d", bp->bp_hops);
if (bp->bp_xid)
- printf(" xid:%d", ntohl(bp->bp_xid));
+ printf(" xid:%ld", (long)ntohl(bp->bp_xid));
if (bp->bp_secs)
printf(" secs:%d", ntohs(bp->bp_secs));
@@ -336,7 +336,7 @@ rfc1048_print(bp, length)
case 'l': /* Long words */
while (len >= 4) {
bcopy((char *) bp, (char *) &ul, 4);
- printf("%d", ntohl(ul));
+ printf("%ld", (long)ntohl(ul));
bp += 4;
len -= 4;
if (len) printf(",");