1 /* Verify that the workarounds in config/mips/irix6-libc-compat.c are still
4 /* IRIX 6, unlike other Unix systems, defines union semun in <sys/sem.h>.
5 Inhibit this definition to be able to run this test on other platforms. */
9 #include <netinet/in.h>
10 #include <arpa/inet.h>
27 ia
.s_addr
= INADDR_BROADCAST
;
29 if (strcmp (inet_ntoa (ia
), "255.255.255.255") != 0)
32 ia
.s_addr
= INADDR_LOOPBACK
;
34 if (inet_lnaof (ia
) != 1)
37 if (inet_netof (ia
) != IN_LOOPBACKNET
)
40 ia
= inet_makeaddr (IN_LOOPBACKNET
, 1);
41 if (ia
.s_addr
!= INADDR_LOOPBACK
)
44 if ((semid
= semget (IPC_PRIVATE
, 1, IPC_CREAT
| IPC_EXCL
| SEM_R
| SEM_A
)) < 0)
49 if (semctl (semid
, 0, SETVAL
, su
) != 0)
52 if (semctl (semid
, 0, GETVAL
) != 10)
55 if (semctl (semid
, 0, IPC_RMID
) != 0)