From a44790f53919f0d129c78b8a288e5f5cac331c66 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 28 Jun 2000 20:11:28 +0000 Subject: [PATCH] Better cross libc support. -Erik --- Makefile | 4 ++-- init.c | 1 - init/init.c | 1 - internal.h | 3 --- utility.c | 1 + 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f44790c80..16573ea89 100644 --- a/Makefile +++ b/Makefile @@ -52,11 +52,11 @@ endif # -D_GNU_SOURCE is needed because environ is used in init.c ifeq ($(DODEBUG),true) - CFLAGS += -Wall -g -fno-builtin -D_GNU_SOURCE + CFLAGS += -Wall -g -D_GNU_SOURCE LDFLAGS += STRIP = else - CFLAGS += -Wall $(OPTIMIZATION) -fomit-frame-pointer -fno-builtin -D_GNU_SOURCE + CFLAGS += -Wall $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE LDFLAGS += -s STRIP = $(STRIPTOOL) --remove-section=.note --remove-section=.comment $(PROG) #Only staticly link when _not_ debugging diff --git a/init.c b/init.c index 9289b86a6..2c2751391 100644 --- a/init.c +++ b/init.c @@ -45,7 +45,6 @@ #include #include #include -//#include #include #include /* for vt_stat */ #include diff --git a/init/init.c b/init/init.c index 9289b86a6..2c2751391 100644 --- a/init/init.c +++ b/init/init.c @@ -45,7 +45,6 @@ #include #include #include -//#include #include #include /* for vt_stat */ #include diff --git a/internal.h b/internal.h index c39dfde62..6e4f06cb5 100644 --- a/internal.h +++ b/internal.h @@ -34,9 +34,6 @@ #include #include #include -#if ! defined(__GLIBC__) && ! defined (__UCLIBC__) -#include -#endif /* Some useful definitions */ diff --git a/utility.c b/utility.c index 061ba6423..a45edde5d 100644 --- a/utility.c +++ b/utility.c @@ -135,6 +135,7 @@ extern int get_kernel_revision(void) #if defined BB_FREE || defined BB_INIT || defined BB_UNAME || defined BB_UPTIME #include +#include _syscall1(int, sysinfo, struct sysinfo *, info); #endif /* BB_INIT */