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
@@ -438,6 +438,8 @@ Pgetcwd(lua_State *L)
return pushstringresult(b);
#else
long size = pathconf(".", _PC_PATH_MAX);
+ if (size == -1)
+ return pusherror(L, "pathconf");
void *ud;
lua_Alloc lalloc;
char *b, *r;
|