X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=blobdiff_plain;f=file.c;h=679755d9754313813808e7bee059a3086399081a;hp=8ccb06b15e62c477a5542860cde38c40b7eaef05;hb=50aedc3c47d1f23981b3a6aed713b944b68b06db;hpb=0cf1ced116843d5faba6326b23b5925a9d64c267 diff --git a/file.c b/file.c index 8ccb06b..679755d 100644 --- a/file.c +++ b/file.c @@ -233,8 +233,10 @@ uh_path_lookup(struct client *cl, const char *url) continue; strcpy(pathptr, idx->name); - if (!stat(path_phys, &s) && (s.st_mode & S_IFREG)) + if (!stat(path_phys, &s) && (s.st_mode & S_IFREG)) { + memcpy(&p.stat, &s, sizeof(p.stat)); break; + } *pathptr = 0; } @@ -246,10 +248,6 @@ uh_path_lookup(struct client *cl, const char *url) return p.phys ? &p : NULL; } -#ifdef __APPLE__ -time_t timegm (struct tm *tm); -#endif - static const char * uh_file_mime_lookup(const char *path) { struct mimetype *m = &uh_mime_types[0];