1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
hurd doesn't support sysv semaphores (semget), and needs -pthread to find
sem_init. POSIX semaphores shared between processes (sem_init(pshared = 1))
aren't supported yet either, but have the best chance to get implemented, so be
prepared.
FATAL: could not create semaphores: Function not implemented
DETAIL: Failed system call was semget(1, 17, 03600).
undefined reference to symbol 'sem_init@@GLIBC_2.12'
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -109,6 +109,10 @@ endif
endif # aix
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH_OS), hurd)
+LIBS += -pthread
+endif # hurd
+
# Update the commonly used headers before building the subdirectories
$(SUBDIRS:%=%-recursive): | generated-headers
--- a/src/template/linux
+++ b/src/template/linux
@@ -28,3 +28,10 @@ if test "$SUN_STUDIO_CC" = "yes" ; then
;;
esac
fi
+
+# force use of POSIX instead of SysV semaphores on hurd-i386
+case $(dpkg-architecture -qDEB_HOST_ARCH) in
+ hurd*)
+ USE_UNNAMED_POSIX_SEMAPHORES=1
+ ;;
+esac
|