diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/cpu/unix/cpu.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index 3b3dbcd383..4f1812b9d1 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -991,25 +991,19 @@ void _CPU_SHM_Init( if ( is_master_node ) { for ( i=0 ; i <= maximum_nodes ; i++ ) { -#if defined(solaris2) +#if !HAS_UNION_SEMUN union semun { int val; struct semid_ds *buf; - ushort *array; - } help; - - help.val = 1; - status = semctl( _CPU_SHM_Semid, i, SETVAL, help ); -#elif defined(__linux__) || defined(__FreeBSD__) - union semun help; - + unsigned short int *array; +#if defined(__linux__) + struct seminfo *__buf; +#endif + } ; +#endif + 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" -#endif fix_syscall_errno(); /* in case of newlib */ if ( status == -1 ) { |