Better cross libc support.
-Erik
This commit is contained in:
parent
a2db097d66
commit
a44790f539
4
Makefile
4
Makefile
@ -52,11 +52,11 @@ endif
|
|||||||
|
|
||||||
# -D_GNU_SOURCE is needed because environ is used in init.c
|
# -D_GNU_SOURCE is needed because environ is used in init.c
|
||||||
ifeq ($(DODEBUG),true)
|
ifeq ($(DODEBUG),true)
|
||||||
CFLAGS += -Wall -g -fno-builtin -D_GNU_SOURCE
|
CFLAGS += -Wall -g -D_GNU_SOURCE
|
||||||
LDFLAGS +=
|
LDFLAGS +=
|
||||||
STRIP =
|
STRIP =
|
||||||
else
|
else
|
||||||
CFLAGS += -Wall $(OPTIMIZATION) -fomit-frame-pointer -fno-builtin -D_GNU_SOURCE
|
CFLAGS += -Wall $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
|
||||||
LDFLAGS += -s
|
LDFLAGS += -s
|
||||||
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
|
STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG)
|
||||||
#Only staticly link when _not_ debugging
|
#Only staticly link when _not_ debugging
|
||||||
|
1
init.c
1
init.c
@ -45,7 +45,6 @@
|
|||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
//#include <sys/sysmacros.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/vt.h> /* for vt_stat */
|
#include <sys/vt.h> /* for vt_stat */
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include <sys/fcntl.h>
|
#include <sys/fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
//#include <sys/sysmacros.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/vt.h> /* for vt_stat */
|
#include <sys/vt.h> /* for vt_stat */
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
@ -34,9 +34,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
#if ! defined(__GLIBC__) && ! defined (__UCLIBC__)
|
|
||||||
#include <asm/string.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Some useful definitions */
|
/* Some useful definitions */
|
||||||
|
@ -135,6 +135,7 @@ extern int get_kernel_revision(void)
|
|||||||
|
|
||||||
#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME
|
#if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
|
#include <linux/unistd.h>
|
||||||
_syscall1(int, sysinfo, struct sysinfo *, info);
|
_syscall1(int, sysinfo, struct sysinfo *, info);
|
||||||
#endif /* BB_INIT */
|
#endif /* BB_INIT */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user