From: Tias Guns Date: Tue, 20 Mar 2012 21:26:07 +0000 Subject: [PATCH] fix ipcs, ipcrm no sys/sem-shm-msg, use linux/sem.h etc patch from 'no-sys-shm,msg,sem' by Dan Drown http://dan.drown.org/android/src/busybox/ Signed-off-by: Tias Guns --- util-linux/ipcrm.c | 9 +++++---- util-linux/ipcs.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c index 274050c..b65e8ef 100644 --- a/util-linux/ipcrm.c +++ b/util-linux/ipcrm.c @@ -22,11 +22,12 @@ /* X/OPEN tells us to use for semctl() */ /* X/OPEN tells us to use for msgctl() */ #include -#include -#include -#include +#include +#include +#include -#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) +#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \ + defined(__ANDROID__) /* union semun is defined by including */ #else /* according to X/OPEN we have to define it ourselves */ diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c index ee7df5e..fafe4e3 100644 --- a/util-linux/ipcs.c +++ b/util-linux/ipcs.c @@ -29,9 +29,9 @@ /* X/OPEN tells us to use for shmctl() */ #include #include -#include -#include -#include +#include +#include +#include #include "libbb.h" @@ -77,7 +77,8 @@ struct shm_info { /* The last arg of semctl is a union semun, but where is it defined? X/OPEN tells us to define it ourselves, but until recently Linux include files would also define it. */ -#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) +#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \ + defined(__ANDROID__) /* union semun is defined by including */ #else /* according to X/OPEN we have to define it ourselves */ -- 1.7.10.4