aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/libbb_udhcp.h
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@asu.edu>2003-12-16 02:28:20 +0000
committerRuss Dill <Russ.Dill@asu.edu>2003-12-16 02:28:20 +0000
commit4b77acafa6f8b907903ea4a140b7c4a314ed71b2 (patch)
treeeb9fcbf83020bdcc0f4cfbab13a22384cbec34a7 /networking/udhcp/libbb_udhcp.h
parent7becf5987a1712e1366c6b7d3eeab70f3978a089 (diff)
downloadbusybox-4b77acafa6f8b907903ea4a140b7c4a314ed71b2.tar.gz
start attempting to bring udhcp in busybox back to the state where it is (ideally) an exact copy of udhcp outside of busybox so that its easy to merge back and forth
Diffstat (limited to 'networking/udhcp/libbb_udhcp.h')
-rw-r--r--networking/udhcp/libbb_udhcp.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/networking/udhcp/libbb_udhcp.h b/networking/udhcp/libbb_udhcp.h
index e09429808..73e21464f 100644
--- a/networking/udhcp/libbb_udhcp.h
+++ b/networking/udhcp/libbb_udhcp.h
@@ -4,7 +4,7 @@
#define _LIBBB_UDHCP_H
#ifdef IN_BUSYBOX
-#include "libbb.h"
+#include "busybox.h"
#ifdef CONFIG_FEATURE_UDHCP_SYSLOG
#define SYSLOG
@@ -17,12 +17,36 @@
#define COMBINED_BINARY
#include "version.h"
+#ifdef CONFIG_INSTALL_NO_USR
+#define DEFAULT_SCRIPT "/share/udhcpc/default.script"
+#else
+#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
+#endif
+
+#define xfopen bb_xfopen
+
#else /* ! BB_VER */
+#include <stdlib.h>
+#include <stdio.h>
+
#define TRUE 1
#define FALSE 0
#define xmalloc malloc
+#define xcalloc calloc
+
+#define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script"
+
+static inline FILE *xfopen(const char *file, const char *mode)
+{
+ FILE *fp;
+ if (!(fp = fopen(file, mode))) {
+ perror("could not open input file");
+ exit(0);
+ }
+ return fp;
+}
#endif /* BB_VER */