board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / empty / 0002-fix-non-thread-build.patch
bloba7e8d90a212ff4859d40a47ec237509e53dab30a
1 empty uses SysV semaphores, so the ifdef is wrong here.
3 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
5 --- empty-0.6.19b.orig/empty.c 2012-09-19 13:24:05.000000000 +0200
6 +++ empty-0.6.19b/empty.c 2015-07-09 02:00:09.000000000 +0200
7 @@ -179,25 +179,23 @@ int main (int argc, char *argv[]) {
8 2 - unknown */
10 /* semaphores */
11 -#ifdef _POSIX_SEMAPHORES
12 - #if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
13 - /* union semun is defined by including <sys/sem.h> */
14 - #else
15 - union semun {
16 - int val;
17 - struct semid_ds *buf;
18 - #ifdef __SVR4
19 - ushort_t *array;
20 - #endif
21 - #ifdef __hpux__
22 - ushort *array;
23 - #endif
24 - #ifdef __linux__
25 - unsigned short *array;
26 - struct seminfo *__buf; /* buffer for IPC_INFO */
27 - #endif
28 - };
29 - #endif
30 +#if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
31 + /* union semun is defined by including <sys/sem.h> */
32 +#else
33 + union semun {
34 + int val;
35 + struct semid_ds *buf;
36 + #ifdef __SVR4
37 + ushort_t *array;
38 + #endif
39 + #ifdef __hpux__
40 + ushort *array;
41 + #endif
42 + #ifdef __linux__
43 + unsigned short *array;
44 + struct seminfo *__buf; /* buffer for IPC_INFO */
45 + #endif
46 + };
47 #endif
48 union semun semu;