File: 0001-Fix-build-on-hurd-i386.patch

package info (click to toggle)
lua-posix 36.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,720 kB
  • sloc: ansic: 5,462; makefile: 21; sh: 6
file content (32 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (2)
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
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Sun, 30 Jun 2013 11:42:21 +0200
Subject: Fix build on hurd-i386

See http://www.debian.org/ports/hurd/
---
 ext/posix/posix.c | 5 +++++
 1 file changed, 5 insertions(+)

--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -9,6 +9,9 @@
  * With contributions by Roberto Ierusalimschy.
  * With documentation from Steve Donovan 2012
  */
+#ifdef __GNU__
+#define _GNU_SOURCE
+#endif
 
 #include "ctype.c"
 #include "dirent.c"
--- a/ext/posix/unistd.c
+++ b/ext/posix/unistd.c
@@ -455,6 +455,8 @@
     free(r);
 #else
 	long size = pathconf(".", _PC_PATH_MAX);
+        if (size == -1)
+            return pusherror(L, "pathconf");
 	void *ud;
 	lua_Alloc lalloc;
 	char *b, *r;