try to support uclibc correctly

This commit is contained in:
Unbit
2013-06-24 16:01:43 +02:00
parent 5743eb2575
commit 575fc26bd7
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -241,6 +241,16 @@ int spool_request(struct uwsgi_spooler *uspool, char *filename, int rn, int core
}
if (at > 0) {
#ifdef __UCLIBC__
struct timespec ts[2];
ts[0].tv_sec = at;
ts[0].tv_nsec = 0;
ts[1].tv_sec = at;
ts[1].tv_nsec = 0;
if (futimens(fd, ts)) {
uwsgi_error("futimens()");
}
#else
struct timeval tv[2];
tv[0].tv_sec = at;
tv[0].tv_usec = 0;
@@ -253,6 +263,7 @@ int spool_request(struct uwsgi_spooler *uspool, char *filename, int rn, int core
#endif
uwsgi_error("futimes()");
}
#endif
}
// here the file will be unlocked too
+1 -1
View File
@@ -347,7 +347,7 @@ static int uwsgi_api_unlock(lua_State *L) {
return 0;
}
static const luaL_reg uwsgi_api[] = {
static const luaL_Reg uwsgi_api[] = {
{"log", uwsgi_api_log},
{"connection_fd", uwsgi_api_req_fd},