pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: www/lighttpd st_mtim* confusion



Am 02.07.2019 um 16:23 schrieb Edgar Fuß:
> 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.
>

> #if defined(st_mtimensec)
> buffer_append_int(etag, st->st_mtimespec.tv_nsec);
> #endif

I would rather change this to:

- buffer_append_int(etag, st->st_mtimespec.tv_nsec);
+ buffer_append_int(etag, st->st_mtimensec);

That way, the code doesn't rely on the exact definition of struct stat,
and it works whether or not _NETBSD_SOURCE is defined.

Looks good to me, otherwise. I mean, your patch, not the original code. :)


Home | Main Index | Thread Index | Old Index