Some patches to make dietlibc work...
This commit is contained in:
parent
20aab260e2
commit
8d79ce8320
3
Config.h
3
Config.h
@ -75,11 +75,12 @@
|
|||||||
#define BB_MKNOD
|
#define BB_MKNOD
|
||||||
#define BB_MKSWAP
|
#define BB_MKSWAP
|
||||||
//#define BB_MKTEMP
|
//#define BB_MKTEMP
|
||||||
//#define BB_NC
|
#define BB_MODPROBE
|
||||||
#define BB_MORE
|
#define BB_MORE
|
||||||
#define BB_MOUNT
|
#define BB_MOUNT
|
||||||
//#define BB_MT
|
//#define BB_MT
|
||||||
#define BB_MV
|
#define BB_MV
|
||||||
|
//#define BB_NC
|
||||||
//#define BB_NSLOOKUP
|
//#define BB_NSLOOKUP
|
||||||
//#define BB_PING
|
//#define BB_PING
|
||||||
//#define BB_PIVOT_ROOT
|
//#define BB_PIVOT_ROOT
|
||||||
|
2
Makefile
2
Makefile
@ -351,7 +351,7 @@ busybox.links: busybox.mkll Config.h applets.h
|
|||||||
nfsmount.o cmdedit.o: %.o: %.h
|
nfsmount.o cmdedit.o: %.o: %.h
|
||||||
sh.o: cmdedit.h
|
sh.o: cmdedit.h
|
||||||
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
|
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
|
||||||
$(CC) -I- $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
|
$(CC) $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
|
||||||
|
|
||||||
$(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile
|
$(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile
|
||||||
- mkdir -p $(PWD_GRP)
|
- mkdir -p $(PWD_GRP)
|
||||||
|
@ -263,6 +263,9 @@
|
|||||||
#ifdef BB_MKTEMP
|
#ifdef BB_MKTEMP
|
||||||
APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
|
APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef BB_MODPROBE
|
||||||
|
APPLET(modprobe, modprobe_main, _BB_DIR_SBIN)
|
||||||
|
#endif
|
||||||
#ifdef BB_MORE
|
#ifdef BB_MORE
|
||||||
APPLET(more, more_main, _BB_DIR_BIN)
|
APPLET(more, more_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
|
@ -1084,6 +1084,13 @@
|
|||||||
"$ ls -la /tmp/temp.mWiLjM\n" \
|
"$ ls -la /tmp/temp.mWiLjM\n" \
|
||||||
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
||||||
|
|
||||||
|
#define modprobe_trivial_usage \
|
||||||
|
"[FILE ...]"
|
||||||
|
#define modprobe_full_usage \
|
||||||
|
"Used for hight level module loading and unloading."
|
||||||
|
#define modprobe_example_usage \
|
||||||
|
"$ modprobe cdrom\n"
|
||||||
|
|
||||||
#define more_trivial_usage \
|
#define more_trivial_usage \
|
||||||
"[FILE ...]"
|
"[FILE ...]"
|
||||||
#define more_full_usage \
|
#define more_full_usage \
|
||||||
|
@ -170,7 +170,7 @@ static void cmdedit_setwidth(int w, int redraw_flg);
|
|||||||
static void win_changed(int nsig)
|
static void win_changed(int nsig)
|
||||||
{
|
{
|
||||||
struct winsize win = { 0, 0, 0, 0 };
|
struct winsize win = { 0, 0, 0, 0 };
|
||||||
static __sighandler_t previous_SIGWINCH_handler; /* for reset */
|
static sighandler_t previous_SIGWINCH_handler; /* for reset */
|
||||||
|
|
||||||
/* emulate || signal call */
|
/* emulate || signal call */
|
||||||
if (nsig == -SIGWINCH || nsig == SIGWINCH) {
|
if (nsig == -SIGWINCH || nsig == SIGWINCH) {
|
||||||
|
@ -61,6 +61,7 @@ enum {
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
|
@ -263,6 +263,9 @@
|
|||||||
#ifdef BB_MKTEMP
|
#ifdef BB_MKTEMP
|
||||||
APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
|
APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef BB_MODPROBE
|
||||||
|
APPLET(modprobe, modprobe_main, _BB_DIR_SBIN)
|
||||||
|
#endif
|
||||||
#ifdef BB_MORE
|
#ifdef BB_MORE
|
||||||
APPLET(more, more_main, _BB_DIR_BIN)
|
APPLET(more, more_main, _BB_DIR_BIN)
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include "../busybox.h"
|
#include "../busybox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNU_LIBRARY__ < 5
|
#if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__)
|
||||||
/* libc5 doesn't define socklen_t */
|
/* libc5 doesn't define socklen_t */
|
||||||
typedef unsigned int socklen_t;
|
typedef unsigned int socklen_t;
|
||||||
/* libc5 doesn't implement BSD 4.4 daemon() */
|
/* libc5 doesn't implement BSD 4.4 daemon() */
|
||||||
|
@ -1084,6 +1084,13 @@
|
|||||||
"$ ls -la /tmp/temp.mWiLjM\n" \
|
"$ ls -la /tmp/temp.mWiLjM\n" \
|
||||||
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
||||||
|
|
||||||
|
#define modprobe_trivial_usage \
|
||||||
|
"[FILE ...]"
|
||||||
|
#define modprobe_full_usage \
|
||||||
|
"Used for hight level module loading and unloading."
|
||||||
|
#define modprobe_example_usage \
|
||||||
|
"$ modprobe cdrom\n"
|
||||||
|
|
||||||
#define more_trivial_usage \
|
#define more_trivial_usage \
|
||||||
"[FILE ...]"
|
"[FILE ...]"
|
||||||
#define more_full_usage \
|
#define more_full_usage \
|
||||||
|
2
init.c
2
init.c
@ -84,7 +84,7 @@ static const int RB_DISABLE_CAD = 0;
|
|||||||
static const int RB_AUTOBOOT = 0x01234567;
|
static const int RB_AUTOBOOT = 0x01234567;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNU_LIBRARY__ > 5
|
#if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__)
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
#define init_reboot(magic) reboot(magic)
|
#define init_reboot(magic) reboot(magic)
|
||||||
#else
|
#else
|
||||||
|
@ -84,7 +84,7 @@ static const int RB_DISABLE_CAD = 0;
|
|||||||
static const int RB_AUTOBOOT = 0x01234567;
|
static const int RB_AUTOBOOT = 0x01234567;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNU_LIBRARY__ > 5
|
#if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__)
|
||||||
#include <sys/reboot.h>
|
#include <sys/reboot.h>
|
||||||
#define init_reboot(magic) reboot(magic)
|
#define init_reboot(magic) reboot(magic)
|
||||||
#else
|
#else
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#include "../busybox.h"
|
#include "../busybox.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNU_LIBRARY__ < 5
|
#if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__)
|
||||||
/* libc5 doesn't define socklen_t */
|
/* libc5 doesn't define socklen_t */
|
||||||
typedef unsigned int socklen_t;
|
typedef unsigned int socklen_t;
|
||||||
/* libc5 doesn't implement BSD 4.4 daemon() */
|
/* libc5 doesn't implement BSD 4.4 daemon() */
|
||||||
|
21
logger.c
21
logger.c
@ -36,17 +36,18 @@
|
|||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* We have to do this since the header file defines static
|
|
||||||
* structures. Argh.... bad libc, bad, bad...
|
|
||||||
*/
|
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
# ifndef __dietlibc__
|
||||||
typedef struct _code {
|
/* We have to do this since the header file defines static
|
||||||
char *c_name;
|
* structures. Argh.... bad libc, bad, bad...
|
||||||
int c_val;
|
*/
|
||||||
} CODE;
|
typedef struct _code {
|
||||||
extern CODE prioritynames[];
|
char *c_name;
|
||||||
extern CODE facilitynames[];
|
int c_val;
|
||||||
|
} CODE;
|
||||||
|
extern CODE prioritynames[];
|
||||||
|
extern CODE facilitynames[];
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Decode a symbolic name to a numeric value
|
/* Decode a symbolic name to a numeric value
|
||||||
|
1
ls.c
1
ls.c
@ -61,6 +61,7 @@ enum {
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
|
1
ps.c
1
ps.c
@ -36,6 +36,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ static void cmdedit_setwidth(int w, int redraw_flg);
|
|||||||
static void win_changed(int nsig)
|
static void win_changed(int nsig)
|
||||||
{
|
{
|
||||||
struct winsize win = { 0, 0, 0, 0 };
|
struct winsize win = { 0, 0, 0, 0 };
|
||||||
static __sighandler_t previous_SIGWINCH_handler; /* for reset */
|
static sighandler_t previous_SIGWINCH_handler; /* for reset */
|
||||||
|
|
||||||
/* emulate || signal call */
|
/* emulate || signal call */
|
||||||
if (nsig == -SIGWINCH || nsig == SIGWINCH) {
|
if (nsig == -SIGWINCH || nsig == SIGWINCH) {
|
||||||
|
@ -36,17 +36,18 @@
|
|||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* We have to do this since the header file defines static
|
|
||||||
* structures. Argh.... bad libc, bad, bad...
|
|
||||||
*/
|
|
||||||
#include <sys/syslog.h>
|
#include <sys/syslog.h>
|
||||||
|
# ifndef __dietlibc__
|
||||||
typedef struct _code {
|
/* We have to do this since the header file defines static
|
||||||
char *c_name;
|
* structures. Argh.... bad libc, bad, bad...
|
||||||
int c_val;
|
*/
|
||||||
} CODE;
|
typedef struct _code {
|
||||||
extern CODE prioritynames[];
|
char *c_name;
|
||||||
extern CODE facilitynames[];
|
int c_val;
|
||||||
|
} CODE;
|
||||||
|
extern CODE prioritynames[];
|
||||||
|
extern CODE facilitynames[];
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Decode a symbolic name to a numeric value
|
/* Decode a symbolic name to a numeric value
|
||||||
|
7
usage.h
7
usage.h
@ -1084,6 +1084,13 @@
|
|||||||
"$ ls -la /tmp/temp.mWiLjM\n" \
|
"$ ls -la /tmp/temp.mWiLjM\n" \
|
||||||
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
"-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n"
|
||||||
|
|
||||||
|
#define modprobe_trivial_usage \
|
||||||
|
"[FILE ...]"
|
||||||
|
#define modprobe_full_usage \
|
||||||
|
"Used for hight level module loading and unloading."
|
||||||
|
#define modprobe_example_usage \
|
||||||
|
"$ modprobe cdrom\n"
|
||||||
|
|
||||||
#define more_trivial_usage \
|
#define more_trivial_usage \
|
||||||
"[FILE ...]"
|
"[FILE ...]"
|
||||||
#define more_full_usage \
|
#define more_full_usage \
|
||||||
|
Loading…
Reference in New Issue
Block a user