[Dnsmasq-discuss] Problem with index in cache.c on OpenBSD 3.4
Mon, 15 Nov 2004 09:43:19 +0000
Ross Williams wrote:
> Hi, in OpenBSD 3.4, there seems to be namespace conflict between
> /usr/include/string.h and cache.c in dnsmasq. DNSmasq declares index as
> a static integer, but it is already declared as a extern struct in
> string.h. The error follows:
> $ make CC=gcc
> gcc -O2 -Wall -W -c cache.c
> cache.c:20: `index' redeclared as different kind of symbol
> /usr/include/string.h:97: previous declaration of `index'
> cache.c:20: warning: `index' was declared `extern' and later `static'
> *** Error code 1
> I suggest a simple fix of renaming the variable in cache.c to
> _dnsmasq_index to preserve namespace integrity. A patch file is attached
> that accomplishes this.
Thanks for that: this is fixed in version 2.17, released yesterday.