Software /
code /
prosody
Diff
util-src/pposix.c @ 5814:5cf1c08805fb
Merge 0.9->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 03 Sep 2013 00:20:28 +0100 |
parent | 5777:c98f11bcd0ea |
parent | 5812:57ebf93ec720 |
child | 5928:1f6923702fc3 |
line wrap: on
line diff
--- a/util-src/pposix.c Mon Sep 02 15:22:41 2013 +0100 +++ b/util-src/pposix.c Tue Sep 03 00:20:28 2013 +0100 @@ -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 @@ -680,7 +680,7 @@ 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);