aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorManolis Ragkousis <manolis837@gmail.com>2015-04-25 18:18:53 +0300
committerLudovic Courtès <ludo@gnu.org>2015-09-04 13:50:38 +0200
commit561840b4aa91bf271acc13864f185586a5a01722 (patch)
tree0777b381928f1e9530aabbd204fa78b306f4d24e /gnu
parent0cce99684ae09808c7236350a7283084d0181de1 (diff)
downloadguix-561840b4aa91bf271acc13864f185586a5a01722.tar
guix-561840b4aa91bf271acc13864f185586a5a01722.tar.gz
gnu: acl: Fix i686-gnu build.
* gnu/packages/patches/acl-hurd-path-max.patch: New file. * gnu-system.am (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/acl.scm4
-rw-r--r--gnu/packages/patches/acl-hurd-path-max.patch80
2 files changed, 83 insertions, 1 deletions
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index 49a2c3c2ab..784186b670 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -26,6 +26,7 @@
#:use-module (gnu packages perl)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (gnu packages)
#:use-module (guix build-system gnu))
(define-public acl
@@ -39,7 +40,8 @@
version ".src.tar.gz"))
(sha256
(base32
- "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))))
+ "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
+ (patches (list (search-patch "acl-hurd-path-max.patch")))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; FIXME: Investigate test suite failures
diff --git a/gnu/packages/patches/acl-hurd-path-max.patch b/gnu/packages/patches/acl-hurd-path-max.patch
new file mode 100644
index 0000000000..89cb3a38d7
--- /dev/null
+++ b/gnu/packages/patches/acl-hurd-path-max.patch
@@ -0,0 +1,80 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636512
+
+From: Svante Signell <srs@kth.se>
+Subject: acl: Fix FTBFS on hurd-i386
+Date: Wed, 03 Aug 2011 19:36:27 +0200
+
+Currently acl does not compile on hurd-i386. The problem is a PATH_MAX
+definition which is not supported on GNU/Hurd.
+
+Index: acl-2.2.52/setfacl/parse.c
+===================================================================
+--- acl-2.2.52/setfacl/parse.c
++++ acl-2.2.52/setfacl/parse.c
+@@ -419,7 +419,13 @@ read_acl_comments(
+ bytes for "# file: ". Not a good solution but for now it is the
+ best I can do without too much impact on the code. [tw]
+ */
++
++#ifdef __GNU__
++ char *linebuf;
++ size_t dummy = 0;
++#else
+ char linebuf[(4*PATH_MAX)+9];
++#endif
+ char *cp;
+ char *p;
+ int comments_read = 0;
+@@ -449,9 +455,13 @@ read_acl_comments(
+ if (line)
+ (*line)++;
+
++#ifdef __GNU__
++ if (getline(&linebuf, &dummy, file) == -1)
++ break;
++#else
+ if (fgets(linebuf, sizeof(linebuf), file) == NULL)
+ break;
+-
++#endif
+ comments_read = 1;
+
+ p = strrchr(linebuf, '\0');
+@@ -473,7 +483,12 @@ read_acl_comments(
+ goto fail;
+ *path_p = (char*)malloc(strlen(cp)+1);
+ if (!*path_p)
++ {
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -1;
++ }
+ strcpy(*path_p, cp);
+ }
+ } else if (strncmp(cp, "owner:", 6) == 0) {
+@@ -522,13 +537,24 @@ read_acl_comments(
+ }
+ }
+ if (ferror(file))
++ {
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -1;
++ }
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return comments_read;
+ fail:
+ if (path_p && *path_p) {
+ free(*path_p);
+ *path_p = NULL;
+ }
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -EINVAL;
+ }
+