[nixio] enclose numexp with a __linux__ switch

This commit is contained in:
Bart Van Der Meerssche 2011-01-24 15:42:38 +01:00
parent c754127df2
commit 728ac3e059
1 changed files with 6 additions and 0 deletions

View File

@ -223,6 +223,8 @@ static int nixio_file_read(lua_State *L) {
}
}
#ifdef __linux__
static int nixio_file_numexp(lua_State *L) {
int fd = nixio__checkfd(L, 1);
uint64_t numexp;
@ -240,6 +242,8 @@ static int nixio_file_numexp(lua_State *L) {
}
}
#endif
static int nixio_file_seek(lua_State *L) {
int fd = nixio__checkfd(L, 1);
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[] = {
{"write", nixio_file_write},
{"read", nixio_file_read},
#ifdef __linux__
{"numexp", nixio_file_numexp},
#endif
{"tell", nixio_file_tell},
{"seek", nixio_file_seek},
{"stat", nixio_file_stat},