From 25d7ead6bb062330390b00da01bab4eb207a9297 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 2 Sep 2013 18:19:38 +0200 Subject: util.pposix: Fix building on non-Linux with glibc --- util-src/pposix.c | 4 ++-- 1 file 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 -#if defined(_GNU_SOURCE) +#if defined(__linux__) && defined(_GNU_SOURCE) #include #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); -- cgit v1.2.3