diff options
-rw-r--r-- | c/src/exec/score/cpu/unix/cpu.c | 7 | ||||
-rw-r--r-- | cpukit/score/cpu/unix/cpu.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c index 219b81f685..e931775c54 100644 --- a/c/src/exec/score/cpu/unix/cpu.c +++ b/c/src/exec/score/cpu/unix/cpu.c @@ -983,7 +983,12 @@ void _CPU_SHM_Init( help.val = 1; status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); -#elif defined(hpux) || defined(__linux__) +#elif defined(__linux__) + union semun help; + + help.val = 1; + status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); +#elif defined(hpux) status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 ); #else #error "Not a supported unix variant" diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index 219b81f685..e931775c54 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -983,7 +983,12 @@ void _CPU_SHM_Init( help.val = 1; status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); -#elif defined(hpux) || defined(__linux__) +#elif defined(__linux__) + union semun help; + + help.val = 1; + status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); +#elif defined(hpux) status = semctl( _CPU_SHM_Semid, i, SETVAL, 1 ); #else #error "Not a supported unix variant" |