From 2052a29c904b81f314656e35dbf25a2fbf1a25d5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 16 Mar 2011 14:31:11 +0100 Subject: fix build on a uclibc based system --- tools/cpio/Makefile | 7 ++----- tools/cpio/src/cpio.c | 1 + tools/cpio/src/ib_alloc.c | 1 + tools/cpio/src/sighold.c | 5 +++-- tools/cpio/src/signal.c | 5 +++-- tools/cpio/src/sigrelse.c | 5 +++-- tools/cpio/src/sigset.c | 6 ++++-- tools/cpio/src/sigset.h | 8 +++++--- 8 files changed, 22 insertions(+), 16 deletions(-) diff --git a/tools/cpio/Makefile b/tools/cpio/Makefile index 2280b1ffb..ceebf8bbb 100644 --- a/tools/cpio/Makefile +++ b/tools/cpio/Makefile @@ -5,8 +5,7 @@ include $(TOPDIR)/rules.mk install: ${TOOLS_DIR}/cpio -SRCS+= \ - src/ib_open.c \ +SRCS:= src/ib_open.c \ src/ib_close.c \ src/ib_read.c \ src/ib_alloc.c \ @@ -15,9 +14,7 @@ SRCS+= \ src/sfile.c \ src/gmatch.c \ src/sigset.c \ - src/memalign.c - -SRCS+= \ + src/memalign.c \ src/version.c \ src/blast.c \ src/crc32.c \ diff --git a/tools/cpio/src/cpio.c b/tools/cpio/src/cpio.c index 8e81a9819..9b3c6eee6 100644 --- a/tools/cpio/src/cpio.c +++ b/tools/cpio/src/cpio.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/cpio/src/ib_alloc.c b/tools/cpio/src/ib_alloc.c index 4020940ce..338d0622b 100644 --- a/tools/cpio/src/ib_alloc.c +++ b/tools/cpio/src/ib_alloc.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "memalign.h" #include "iblok.h" diff --git a/tools/cpio/src/sighold.c b/tools/cpio/src/sighold.c index e35c33e0f..bae3bc393 100644 --- a/tools/cpio/src/sighold.c +++ b/tools/cpio/src/sighold.c @@ -22,7 +22,8 @@ /* Sccsid @(#)sighold.c 1.7 (gritter) 1/22/06 */ #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ - defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) + defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || \ + defined (__UCLIBC__) #include #include "sigset.h" @@ -38,4 +39,4 @@ sighold(int sig) return sigprocmask(SIG_BLOCK, &set, &oset); } #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || - __DragonFly__ || __APPLE__ */ + __DragonFly__ || __APPLE__ || __UCLIBC__ */ diff --git a/tools/cpio/src/signal.c b/tools/cpio/src/signal.c index e511aeba6..1f9d51cb7 100644 --- a/tools/cpio/src/signal.c +++ b/tools/cpio/src/signal.c @@ -22,7 +22,8 @@ /* Sccsid @(#)signal.c 1.6 (gritter) 1/22/06 */ #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ - defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) + defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || \ + defined (__UCLIBC__) #include #include "sigset.h" @@ -42,4 +43,4 @@ void (*signal(int sig, void (*func)(int)))(int) return oact.sa_handler; } #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || - __DragonFly__ || __APPLE__ */ + __DragonFly__ || __APPLE__ || __UCLIBC__ */ diff --git a/tools/cpio/src/sigrelse.c b/tools/cpio/src/sigrelse.c index c6976c9b8..d74de74bf 100644 --- a/tools/cpio/src/sigrelse.c +++ b/tools/cpio/src/sigrelse.c @@ -22,7 +22,8 @@ /* Sccsid @(#)sigrelse.c 1.8 (gritter) 1/22/06 */ #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ - defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) + defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || \ + defined (__UCLIBC__) #include #include "sigset.h" @@ -38,4 +39,4 @@ sigrelse(int sig) return sigprocmask(SIG_UNBLOCK, &set, &oset); } #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || - __DragonFly__ || __APPLE__ */ + __DragonFly__ || __APPLE__ || __UCLIBC__ */ diff --git a/tools/cpio/src/sigset.c b/tools/cpio/src/sigset.c index fe1482f14..222ae7d9f 100644 --- a/tools/cpio/src/sigset.c +++ b/tools/cpio/src/sigset.c @@ -21,8 +21,10 @@ */ /* Sccsid @(#)sigset.c 1.7 (gritter) 1/22/06 */ +#include #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ - defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) + defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || \ + defined (__UCLIBC__) #include #include "sigset.h" @@ -52,4 +54,4 @@ void (*sigset(int sig, void (*func)(int)))(int) return (oact.sa_handler); } #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || - __DragonFly__ || __APPLE__ */ + __DragonFly__ || __APPLE__ || __UCLIBC__ */ diff --git a/tools/cpio/src/sigset.h b/tools/cpio/src/sigset.h index d4b834d19..52fd8cd6a 100644 --- a/tools/cpio/src/sigset.h +++ b/tools/cpio/src/sigset.h @@ -21,8 +21,10 @@ */ /* Sccsid @(#)sigset.h 1.9 (gritter) 1/22/06 */ +#include #if defined (__FreeBSD__) || defined (__dietlibc__) || defined (__NetBSD__) || \ - defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) + defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__) || \ + defined (__UCLIBC__) #ifndef SIG_HOLD #define SIG_HOLD ((void (*)(int))2) @@ -30,9 +32,9 @@ extern int sighold(int); extern int sigignore(int); -extern int sigpause(int); +//extern int sigpause(int); extern int sigrelse(int); extern void (*sigset(int, void (*)(int)))(int); extern void (*signal(int, void (*)(int)))(int); #endif /* __FreeBSD__ || __dietlibc__ || __NetBSD__ || __OpenBSD__ || - __DragonFly__ || __APPLE__ */ + __DragonFly__ || __APPLE__ || __UCLIBC__ */ -- cgit v1.2.3