[Dnsmasq-discuss] Announce: dnsmasq-2.73rc1
Roy Marples
roy at marples.name
Fri Mar 20 14:05:22 GMT 2015
On 20/03/2015 12:49, Alfonso Ranieri wrote:
> Il 20/03/2015 00:42, Simon Kelley ha scritto:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> I want to start the release-process towards 2.73. There's a whole heap
>> of good stuff since 2.72, and good reasons to get it out there before
>> proceeding further with stuff that's in progress.
>>
>> Please test if you can, code is available at
>
> I, am using dnsmasq in a small router firmware for some Netgear router
> modem.
>
> To make the new inotify system dnsmasq compile under my toolchain (which
> is gcc 4.2.2, kernel 2.6.30, uClibc 0.9.29) I had to make these changes
> (expecially realpath() wants the second args to be not NULL)
>
> --- src/inotify.c.orig 2015-03-20 13:44:29.000000000 +0100
> +++ src/inotify.c 2015-03-20 13:44:42.000000000 +0100
> @@ -19,6 +19,13 @@
>
> #include <sys/inotify.h>
>
> +#ifndef IN_CLOEXEC
> +#ifndef O_CLOEXEC
> +#define O_CLOEXEC 02000000
> +#endif
> +#define IN_CLOEXEC O_CLOEXEC
> +#endif
> +
> #ifndef IN_NONBLOCK
> # define IN_NONBLOCK O_NONBLOCK
> #endif
> @@ -57,7 +64,9 @@
> for (res = daemon->resolv_files; res; res = res->next)
> {
> char *d = NULL, *path;
> - if (!(path = realpath(res->name, NULL)))
> + char _b[256];
> +
> + if (!(path = realpath(res->name, _b)))
> {
> /* realpath will fail if the file doesn't exist, but
> dnsmasq copes with missing files, so fall back
While that may compile, it surely won't work.
If O_CLOEXEC doesn't exist, then you need to set FD_CLOEXEC via fnctl(2)
Roy
More information about the Dnsmasq-discuss
mailing list