[Dnsmasq-discuss] [PATCH v2 0/1] Use nanosecond granularity when checking for file changes.

Karl Vogel karl.vogel at gmail.com
Sat Oct 4 17:10:00 BST 2014

On Fri, Oct 3, 2014 at 10:08 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
> On 30/09/14 15:02, Karl Vogel wrote:
>> First version of the patch generated a compiler warning due
>> to improper initialization of a variable.
>> Karl Vogel (1):
>>   Use nanosecond granularity when checking for file changes.
>>  src/dnsmasq.c |   20 +++++++++++---------
>>  src/dnsmasq.h |    7 ++++++-
>>  src/option.c  |    3 ++-
>>  3 files changed, 19 insertions(+), 11 deletions(-)
> This looks fine, but I have a vague worry about breaking the build on
> old C libraries that don't define the st_mtim field. Does anyone know
> when this entered the standard? This Ubuntu 14.04 system has the
> nanosecond fields in the headers, but not in  the stat(3) manpage :(

According to the linux man page, "nanosecond timestamps are nowadays
standardized, starting with POSIX.1-2008". (supported since kernel 2.5.48)


It is also present in uClibC (I actually needed the patch for my OpenWRT
gateway, which uses uclibc).

I'm not sure what the status is of the BSD's.

The first fix I had checked the inode, but that only works if the file gets


More information about the Dnsmasq-discuss mailing list