aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Marc <beberking@gmail.com>2012-06-03 15:38:26 +0200
committerBertrand Marc <beberking@gmail.com>2012-06-03 15:38:26 +0200
commitc47dd4e3165b7894669d8f7f800bac75ac8ad95c (patch)
tree5fdf202de64304f054451506494cb2517aceac46
parent7d3c223fed163da094acfbaaa5b524d4e18cb683 (diff)
Fix build on GNU Hurd, thanks to Cyril Roelandt (Closes: #670794).
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/support_GNU_hurd.patch44
2 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f5b7ca3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+support_GNU_hurd.patch
diff --git a/debian/patches/support_GNU_hurd.patch b/debian/patches/support_GNU_hurd.patch
new file mode 100644
index 0000000..09a2db7
--- /dev/null
+++ b/debian/patches/support_GNU_hurd.patch
@@ -0,0 +1,44 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,6 +159,11 @@
+ DLLDIR=bin
+ UNIXONLY=""
+ ;;
++gnu*)
++ AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system])
++ build_target="gnu"
++ UNIXONLY="#"
++ ;;
+ *)
+ AC_MSG_RESULT(Unrecognised OS $host_os)
+ AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
+@@ -180,6 +185,7 @@
+ AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
+ AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
+ AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
++AM_CONDITIONAL(GNU, test "$build_target" = "gnu")
+
+ AC_MSG_RESULT([$build_target])
+ AC_SUBST(build_target)
+--- a/src/include/platform.h
++++ b/src/include/platform.h
+@@ -146,7 +146,7 @@
+ #include <semaphore.h>
+ #include <net/if.h>
+ #endif
+-#ifdef LINUX
++#if defined(LINUX) || defined(GNU)
+ #include <net/if.h>
+ #endif
+ #ifdef SOLARIS
+--- a/src/util/disk.c
++++ b/src/util/disk.c
+@@ -51,7 +51,7 @@
+
+
+
+-#if defined(LINUX) || defined(CYGWIN)
++#if defined(LINUX) || defined(CYGWIN) || defined(GNU)
+ #include <sys/vfs.h>
+ #else
+ #if defined(SOMEBSD) || defined(DARWIN)