projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c97c6c
)
util.pposix: Fix building on non-Linux with glibc
author
Kim Alvefur
<zash@zash.se>
Mon, 2 Sep 2013 16:19:38 +0000
(18:19 +0200)
committer
Kim Alvefur
<zash@zash.se>
Mon, 2 Sep 2013 16:19:38 +0000
(18:19 +0200)
util-src/pposix.c
patch
|
blob
|
history
diff --git
a/util-src/pposix.c
b/util-src/pposix.c
index e2cd142ef99c4bff536b1ea4c6856ef1a1af8946..7f64038beb3bd07bd353396ee47de4502e1db0b8 100644
(file)
--- a/
util-src/pposix.c
+++ b/
util-src/pposix.c
@@
-36,7
+36,7
@@
#include "lauxlib.h"
#include <fcntl.h>
-#if defined(_GNU_SOURCE)
+#if defined(_
_linux__) && defined(_
GNU_SOURCE)
#include <linux/falloc.h>
#endif
@@
-670,7
+670,7
@@
int lc_fallocate(lua_State* L)
offset = luaL_checkinteger(L, 2);
len = luaL_checkinteger(L, 3);
-#if defined(_GNU_SOURCE)
+#if defined(_
_linux__) && defined(_
GNU_SOURCE)
if(fallocate(fileno(f), FALLOC_FL_KEEP_SIZE, offset, len) == 0)
{
lua_pushboolean(L, 1);