From c2d2f13bfbdbfaf63d2aa9104128845bc5ea61b9 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 23 Nov 2012 08:45:24 +0200 Subject: [PATCH] uClibc compatibility for core --- core/spooler.c | 10 +++++----- core/utils.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/spooler.c b/core/spooler.c index 45cfeb02..0693caee 100644 --- a/core/spooler.c +++ b/core/spooler.c @@ -227,17 +227,17 @@ int spool_request(struct uwsgi_spooler *uspool, char *filename, int rn, int core } if (at > 0) { - struct timeval tv[2]; + struct timespec tv[2]; tv[0].tv_sec = at; - tv[0].tv_usec = 0; + tv[0].tv_nsec = 0; tv[1].tv_sec = at; - tv[1].tv_usec = 0; + tv[1].tv_nsec = 0; #ifdef __sun__ if (futimesat(fd, NULL, tv)) { #else - if (futimes(fd, tv)) { + if (futimens(fd, tv)) { #endif - uwsgi_error("futimes()"); + uwsgi_error("futimens()"); } } diff --git a/core/utils.c b/core/utils.c index e04e5688..d52aa6e1 100644 --- a/core/utils.c +++ b/core/utils.c @@ -1,3 +1,5 @@ +#include + #include "uwsgi.h"