Package: mcs
Version: 0.7.1-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd


Coin,

Please consider applying this patch to your next upload and help push this fix upstream. Using PATH_MAX unconditionally is an important POSIX incompatibility. On Hurd PATH_MAX is not needed and not defined, thus the FTBFS. This fix works around this problem, even if relying on dynamic allocation when it is undefined would be a better solution (but the patch would be harder and more intrusive).

Regards.

--
Marc Dequènes (Duck)
diff -Nur orig/mcs-0.7.1/debian/changelog mcs-0.7.1/debian/changelog
--- orig/mcs-0.7.1/debian/changelog	2009-05-28 23:02:27.000000000 +0200
+++ mcs-0.7.1/debian/changelog	2009-05-28 16:44:24.000000000 +0200
@@ -1,3 +1,9 @@
+mcs (0.7.1-1+hurdfr1) unreleased; urgency=low
+
+  * Added '002-posixness_fix.dpatch' patch to fix POSIX incompatibility.
+
+ -- Marc Dequènes (Duck) <[email protected]>  Thu, 28 May 2009 16:44:10 +0200
+
 mcs (0.7.1-1) unstable; urgency=low
 
   * New upstream release.
diff -Nur orig/mcs-0.7.1/debian/patches/002-posixness_fix.dpatch mcs-0.7.1/debian/patches/002-posixness_fix.dpatch
--- orig/mcs-0.7.1/debian/patches/002-posixness_fix.dpatch	1970-01-01 01:00:00.000000000 +0100
+++ mcs-0.7.1/debian/patches/002-posixness_fix.dpatch	2009-05-28 16:45:32.000000000 +0200
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 002-posixness_fix.dpatch
+## by Marc Dequènes (Duck) <[email protected]>
+##
+## DP: relying on PATH_MAX unconditionnaly is an important
+## DP: POSIX incompatibility. This patch is a quick workaround.
+
+...@dpatch@
+--- z/src/libmcs/mcs.h.orig	2009-05-28 16:38:46.000000000 +0200
++++ z/src/libmcs/mcs.h	2009-05-28 16:42:19.000000000 +0200
+@@ -54,6 +54,10 @@
+ # include <libmcs/mcs_config.h>
+ #endif
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /*! mcs_response_t denotes the status of a transaction. */
+ typedef enum {
+ 	MCS_FAIL, /*!< designates transaction failure */
diff -Nur orig/mcs-0.7.1/debian/patches/00list mcs-0.7.1/debian/patches/00list
--- orig/mcs-0.7.1/debian/patches/00list	2009-05-28 23:02:27.000000000 +0200
+++ mcs-0.7.1/debian/patches/00list	2009-05-28 16:46:00.000000000 +0200
@@ -1 +1,2 @@
 001-Disable_Makefile_silent_output.dpatch
+002-posixness_fix.dpatch

Attachment: pgpf59aPDZIM2.pgp
Description: PGP Digital Signature

Reply via email to