aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-09-02 18:19:38 +0200
committerKim Alvefur <zash@zash.se>2013-09-02 18:19:38 +0200
commit5eebc0a42fe2aa5cfb88b94899a8a6266d0bb989 (patch)
tree9df06646604294e5e14192f4dfbd6717deb4a4da /util-src
parentc7d98b691e7378e7be098ebab51b359dfce8a8ed (diff)
downloadprosody-5eebc0a42fe2aa5cfb88b94899a8a6266d0bb989.tar.gz
prosody-5eebc0a42fe2aa5cfb88b94899a8a6266d0bb989.zip
util.pposix: Fix building on non-Linux with glibc
Diffstat (limited to 'util-src')
-rw-r--r--util-src/pposix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index e2cd142e..7f64038b 100644
--- 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);