diff options
Diffstat (limited to 'c/src/exec/score')
-rw-r--r-- | c/src/exec/score/cpu/unix/cpu.c | 22 | ||||
-rw-r--r-- | c/src/exec/score/cpu/unix/wrap/Makefile.in | 2 |
2 files changed, 9 insertions, 15 deletions
diff --git a/c/src/exec/score/cpu/unix/cpu.c b/c/src/exec/score/cpu/unix/cpu.c index 3b3dbcd383..4f1812b9d1 100644 --- a/c/src/exec/score/cpu/unix/cpu.c +++ b/c/src/exec/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 ) { diff --git a/c/src/exec/score/cpu/unix/wrap/Makefile.in b/c/src/exec/score/cpu/unix/wrap/Makefile.in index ca39368399..925e5f9a42 100644 --- a/c/src/exec/score/cpu/unix/wrap/Makefile.in +++ b/c/src/exec/score/cpu/unix/wrap/Makefile.in @@ -53,7 +53,7 @@ $(INSTALLDIRS): # (OPTIONAL) Add local stuff here using += # -DEFINES += -DCPU_SYNC_IO $(LIBC_DEFINES) +DEFINES += -DCPU_SYNC_IO $(LIBC_DEFINES) @DEFS@ CPPFLAGS += -I$(srcdir)/.. CFLAGS += $(CFLAGS_OS_V) |