diff --git a/osx.c b/osx.c index 9219736..40035f6 100644 --- a/osx.c +++ b/osx.c @@ -177,7 +177,7 @@ fail: #endif #ifdef __linux__ -#define sys_posix_fadvise(fd, advice) posix_fadvise(fd, 0, 0, advice) +#define fadvise(fd, advice) posix_fadvise(fd, 0, 0, advice) #else // Stub posix_fadvise() #define POSIX_FADV_NORMAL 0 @@ -185,7 +185,7 @@ fail: #define POSIX_FADV_RANDOM 0 #define POSIX_FADV_NOREUSE 0 -static inline int sys_posix_fadvise(int fd, int advice) +static inline int fadvise(int fd, int advice) { (void) fd; (void) advice; @@ -645,7 +645,7 @@ static int os_fadvise(lua_State *L) luaL_Stream *stream = luaL_checkudata(L, 1, LUA_FILEHANDLE); int i = luaL_checkoption(L, 2, NULL, hints); - int ec = sys_posix_fadvise(fileno(stream->f), ihints[i]); + int ec = fadvise(fileno(stream->f), ihints[i]); return os_result(L, ec, NULL); }