summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-02-07 14:27:04 +0000
committerJeremy Allison <jra@samba.org>2000-02-07 14:27:04 +0000
commit868c81eefa72b31023eeac32788eaa439013c0f8 (patch)
treebf6d5a4ddfc72d27fa47dd7e4c60d14d1e9e129a /source3/include
parent427a3baa9ccb942b82832f255e09acc87afca166 (diff)
downloadsamba-868c81eefa72b31023eeac32788eaa439013c0f8.tar.gz
samba-868c81eefa72b31023eeac32788eaa439013c0f8.tar.bz2
samba-868c81eefa72b31023eeac32788eaa439013c0f8.zip
Added check for SGI IRIX brokenness with semaphores when using gcc.
Code from Don Badrak <dbadrak@census.gov> Jeremy. (This used to be commit 773d6e504b1ac97f0d8136002ace2c0c0771a163)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in5
-rw-r--r--source3/include/includes.h19
2 files changed, 20 insertions, 4 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 49344a05c8..c8d5d89233 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -180,6 +180,8 @@
#undef USE_SETRESUID
#undef USE_SETREUID
#undef USE_SETUIDX
+#undef HAVE_LIBDL
+#undef NEED_SGI_SEMUN_HACK
/* The number of bytes in a int. */
#undef SIZEOF_INT
@@ -883,9 +885,6 @@
/* Define if you have the cups library (-lcups). */
#undef HAVE_LIBCUPS
-/* Define if you have the dl library (-ldl). */
-#undef HAVE_LIBDL
-
/* Define if you have the gen library (-lgen). */
#undef HAVE_LIBGEN
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 5b3af75c04..127e6d59af 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -268,7 +268,24 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/sem.h>
-#endif
+
+/*
+ * The following is needed if compiling
+ * with gcc on SGI IRIX 6.5.x systems as
+ * the structure packing for system calls is
+ * different between IRIX cc and gcc.
+ */
+
+#ifdef NEED_SGI_SEMUN_HACK
+union semun_hack {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ char __dummy[5];
+};
+#define semun semun_hack
+#endif /* NEED_SGI_SEMUN_HACK */
+#endif /* HAVE_SYSV_IPC */
#ifdef HAVE_NET_IF_H
#include <net/if.h>