Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Dec 2015 18:06:24 +0100
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        Eric van Gyzen <vangyzen@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r289315 - in head: include lib/libc/resolv share/man/man5
Message-ID:  <86r3j06d0v.fsf@FreeBSD.org>
In-Reply-To: <201510141426.t9EEQiWX079418__45653.4197823659$1444832818$gmane$org@repo.freebsd.org> (Eric van Gyzen's message of "Wed, 14 Oct 2015 14:26:44 %2B0000 (UTC)")
References:  <201510141426.t9EEQiWX079418__45653.4197823659$1444832818$gmane$org@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Eric van Gyzen <vangyzen@FreeBSD.org> writes:

> Author: vangyzen
> Date: Wed Oct 14 14:26:44 2015
> New Revision: 289315
> URL: https://svnweb.freebsd.org/changeset/base/289315
>
> Log:
>   resolver: automatically reload /etc/resolv.conf
>
> [...]
>
> Modified: head/include/resolv.h
> ==============================================================================
> --- head/include/resolv.h	Wed Oct 14 12:46:05 2015	(r289314)
> +++ head/include/resolv.h	Wed Oct 14 14:26:44 2015	(r289315)
>
> [...]
>
> @@ -188,6 +189,8 @@ struct __res_state {
>  		} _ext;
>  	} _u;
>  	u_char	*_rnd;			/*%< PRIVATE: random state */
> +	struct timespec	conf_mtim;	/*%< mod time of loaded resolv.conf */
> +	time_t		conf_stat;	/*%< time of last stat(resolv.conf) */
>  };

With this change, including the headers listed in resolver(3),
sys/types.h, netinet/in.h, arpa/nameser.h and resolv.h is not enough, as
resolv.h now depends on sys/time.h. This has broken at least one port,
net-mgmt/sx. It includes those 4 headers to find if the resolver library
is in libc. The test program fails like this:

In file included from conftest.c:31:
/usr/include/resolv.h:192:18: error: field has incomplete type 'struct timespec'
        struct timespec conf_mtim;      /*%< mod time of loaded resolv.conf */
                        ^
/usr/include/resolv.h:192:9: note: forward declaration of 'struct timespec'
        struct timespec conf_mtim;      /*%< mod time of loaded resolv.conf */
               ^



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r3j06d0v.fsf>