(unsigned long) packet.xid, xid);
continue;
}
+
/* Ignore packets that aren't for us */
if (memcmp(packet.chaddr, client_config.arp, 6)) {
DEBUG(LOG_INFO, "packet does not have our chaddr -- ignoring");
#ifndef _DHCPC_H
#define _DHCPC_H
-#ifndef DEFAULT_SCRIPT
-#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
-#endif
+/* grab define DEFAULT_SCRIPT */
+#include "libbb_udhcp.h"
#define INIT_SELECTING 0
#define REQUESTING 1
/* vi: set sw=4 ts=4: */
/*
- Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
*/
#include <fcntl.h>
#include <string.h>
/* bit of a hack, do this no matter what the order of the includes.
* (for busybox) */
-#ifdef CONFIG_INSTALL_NO_USR
-#undef DEFAULT_SCRIPT
-#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
-#endif
-
#ifndef _LIBBB_UDHCP_H
#define _LIBBB_UDHCP_H
+#ifdef CONFIG_INSTALL_NO_USR
+# define DEFAULT_SCRIPT "/share/udhcpc/default.script"
+#else
+# define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
+#endif
+
#ifdef IN_BUSYBOX
#include "busybox.h"
/* from dhcpd.h */
#define server_config udhcp_server_config
-#else /* ! BB_VER */
+#else /* ! IN_BUSYBOX */
#include <stdlib.h>
#include <stdio.h>
#include <sys/sysinfo.h>
+#ifndef ATTRIBUTE_NORETURN
+#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif /* ATTRIBUTE_NORETURN */
+
+#ifndef ATTRIBUTE_PACKED
+#define ATTRIBUTE_PACKED __attribute__ ((__packed__))
+#endif /* ATTRIBUTE_PACKED */
+
#define TRUE 1
#define FALSE 0
return fp;
}
-#endif /* BB_VER */
+#endif /* IN_BUSYBOX */
#endif /* _LIBBB_UDHCP_H */