sync busybox and udhcp trees
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -469,6 +469,7 @@ int main(int argc, char *argv[]) | |
| (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"); | |
| @@ -2,9 +2,8 @@ | |
| #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 | |
| @@ -1,6 +1,6 @@ | |
| /* 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> | |
| @@ -139,6 +139,7 @@ static void attach_option(struct option_set **opt_list, struct dhcp_option *opti | |
| } | |
| } | |
| + | |
| /* read a dhcp option and add it to opt_list */ | |
| static int read_opt(const char *const_line, void *arg) | |
| { | |
| @@ -3,14 +3,15 @@ | |
| /* 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" | |
| @@ -56,12 +57,20 @@ | |
| /* 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 | |
| @@ -78,6 +87,6 @@ static inline FILE *xfopen(const char *file, const char *mode) | |
| return fp; | |
| } | |
| - | #endif /* BB_VER */ |
| + | #endif /* IN_BUSYBOX */ |
| #endif /* _LIBBB_UDHCP_H */ | |
| @@ -170,4 +170,3 @@ int add_simple_option(uint8_t *optionptr, uint8_t code, uint32_t data) | |
| DEBUG(LOG_ERR, "Could not add option 0x%02x", code); | |
| return 0; | |
| } | |
| - | |
| @@ -50,7 +50,6 @@ int get_packet(struct dhcpMessage *packet, int fd) | |
| "MSFT 98", | |
| "" | |
| }; | |
| - | |
| int bytes; | |
| int i; | |
| char unsigned *vendor; | |
| @@ -79,7 +78,6 @@ int get_packet(struct dhcpMessage *packet, int fd) | |
| } | |
| } | |
| - | |
| return bytes; | |
| } | |