Date: Sat, 6 Oct 2012 11:06:35 GMT From: Antonio Querubin <tony@lavanauts.org> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/172390: __res_state_ext missing from system headers Message-ID: <201210061106.q96B6Z3A071394@red.freebsd.org> Resent-Message-ID: <201210061110.q96BADpA030683@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172390 >Category: misc >Synopsis: __res_state_ext missing from system headers >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 06 11:10:13 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Antonio Querubin >Release: 9.0 >Organization: >Environment: FreeBSD vm2 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:15:25 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Programs that use the resolver library but query IPv6 resolvers directly require access to the IPv6 extensions in resolv.h. However, the definition for struct __res_state_ext is missing from the standard system header files. >How-To-Repeat: The following will fail to compile: #include <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> int main(void) { struct __res_state myres; struct __res_state_ext *myres6; struct sockaddr_in6 *mysockaddr6; res_ninit(&myres); myres6 = myres._u._ext.ext; mysockaddr6 = &(myres6->nsaddrs[0].sin6); } >Fix: Include a definition for struct __res_state_ext in resolv.h struct __res_state_ext { union res_sockaddr_union nsaddrs[MAXNS]; struct sort_list { int af; union { struct in_addr ina; struct in6_addr in6a; } addr, mask; } sort_list[MAXRESOLVSORT]; char nsuffix[64]; char nsuffix2[64]; }; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210061106.q96B6Z3A071394>