Needs some testing though.
#include <dirent.h>
#include <string.h>
#include <sys/vfs.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/shm.h>
#include <netinet/in.h>
#ifndef NO_ASMSIGNALH
#include <asm/signal.h>
#include <sys/statvfs.h>
#include <sys/filio.h>
#include <sys/sockio.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/shm.h>
#include <netinet/in_systm.h>
#include <netinet/tcp.h>
#include <netinet/ip.h>
#define USE_WAITPID
#define USE_DIRECT
#define USE_SETSID
+#define USE_SYSV_IPC
#endif
#if defined(SGI5) || defined(SGI6)
#define USE_STATVFS
#define USE_WAITPID
#define USE_SETSID
+#define USE_SYSV_IPC
#endif
#define USE_STATVFS
#define USE_GETCWD
#define USE_SETSID
+#define USE_SYSV_IPC
#endif
#include <sys/types.h>
#include <sys/termios.h>
#include <netinet/tcp.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <sys/shm.h>
#ifdef HPUX_10_TRUSTED
#include <hpsecurity.h>
#include <prot.h>
#endif
#endif
+#ifdef USE_SYSV_IPC
+#include <sys/ipc.h>
+#include <sys/sem.h>
+#include <sys/shm.h>
+#endif
#ifdef AFS_AUTH
#include <afs/stds.h>