[nixio] enclose numexp with a __linux__ switch
This commit is contained in:
parent
c754127df2
commit
728ac3e059
|
@ -223,6 +223,8 @@ static int nixio_file_read(lua_State *L) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
|
||||||
static int nixio_file_numexp(lua_State *L) {
|
static int nixio_file_numexp(lua_State *L) {
|
||||||
int fd = nixio__checkfd(L, 1);
|
int fd = nixio__checkfd(L, 1);
|
||||||
uint64_t numexp;
|
uint64_t numexp;
|
||||||
|
@ -240,6 +242,8 @@ static int nixio_file_numexp(lua_State *L) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static int nixio_file_seek(lua_State *L) {
|
static int nixio_file_seek(lua_State *L) {
|
||||||
int fd = nixio__checkfd(L, 1);
|
int fd = nixio__checkfd(L, 1);
|
||||||
off_t len = (off_t)nixio__checknumber(L, 2);
|
off_t len = (off_t)nixio__checknumber(L, 2);
|
||||||
|
@ -366,7 +370,9 @@ static int nixio_file__tostring(lua_State *L) {
|
||||||
static const luaL_reg M[] = {
|
static const luaL_reg M[] = {
|
||||||
{"write", nixio_file_write},
|
{"write", nixio_file_write},
|
||||||
{"read", nixio_file_read},
|
{"read", nixio_file_read},
|
||||||
|
#ifdef __linux__
|
||||||
{"numexp", nixio_file_numexp},
|
{"numexp", nixio_file_numexp},
|
||||||
|
#endif
|
||||||
{"tell", nixio_file_tell},
|
{"tell", nixio_file_tell},
|
||||||
{"seek", nixio_file_seek},
|
{"seek", nixio_file_seek},
|
||||||
{"stat", nixio_file_stat},
|
{"stat", nixio_file_stat},
|
||||||
|
|
Loading…
Reference in New Issue