From 0e3125e59ce752c6078787c38915722401f764cb Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Mon, 12 Dec 2022 15:58:36 +0100 Subject: [PATCH] [osx] sys_posix_fadvise()->fadvise(). --- osx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }