pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
www/lighttpd st_mtim* confusion
Does www/lighttpd from 2019Q2 build for anyone on NetBSD?
I needed the attached patch because it seems to use the wrong #ifdef's
to figure out how to extract nanoseconds fromt struct stat.
$NetBSD: patch-src_etag.c $
Fix incorrect st_mtime(spec) usage
--- src/etag.c.orig 2019-05-27 23:03:50.000000000 +0200
+++ src/etag.c 2019-07-02 15:57:17.000000000 +0200
@@ -160,7 +160,10 @@ int etag_create(buffer *etag, const stru
if (flags & ETAG_USE_MTIME) {
buffer_append_int(etag, st->st_mtime);
- #ifdef st_mtime /* use high-precision timestamp if available */
+ /* use high-precision timestamp if available */
+ #if defined(st_mtimensec)
+ buffer_append_int(etag, st->st_mtimespec.tv_nsec);
+ #elif defined(st_mtime)
#if defined(__APPLE__) && defined(__MACH__)
buffer_append_int(etag, st->st_mtimespec.tv_nsec);
#else
Home |
Main Index |
Thread Index |
Old Index