From owner-freebsd-bugs@FreeBSD.ORG Sat Sep 28 19:30:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ABD2140D for ; Sat, 28 Sep 2013 19:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4B72E02 for ; Sat, 28 Sep 2013 19:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r8SJU0HM078180 for ; Sat, 28 Sep 2013 19:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r8SJU0tN078179; Sat, 28 Sep 2013 19:30:00 GMT (envelope-from gnats) Resent-Date: Sat, 28 Sep 2013 19:30:00 GMT Resent-Message-Id: <201309281930.r8SJU0tN078179@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jan Beich Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE56F30B for ; Sat, 28 Sep 2013 19:29:42 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C24732DFC for ; Sat, 28 Sep 2013 19:29:42 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r8SJTgCf070741 for ; Sat, 28 Sep 2013 19:29:42 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r8SJTgeW070723; Sat, 28 Sep 2013 19:29:42 GMT (envelope-from nobody) Message-Id: <201309281929.r8SJTgeW070723@oldred.freebsd.org> Date: Sat, 28 Sep 2013 19:29:42 GMT From: Jan Beich To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/182466: [patch] make self-contained X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 19:30:00 -0000 >Number: 182466 >Category: bin >Synopsis: [patch] make self-contained >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 Sep 28 19:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Jan Beich >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: http://cvsweb.netbsd.org/bsdweb.cgi/src/include/resolv.h.diff?r1=1.39&r2=1.40 https://bug810716.bugzilla.mozilla.org/attachment.cgi?id=808118 >Description: Our resolv.h already includes a bunch of headers listed in resolver(3) man page. Make the list complete by adding netinet/in.h for sockaddr_in. This should reduce patching required when porting code written with Linux or NetBSD in mind. reinstating kern/85741 >How-To-Repeat: $ cat a.c #include int main() { return 0; } $ cc a.c In file included from a.c:1: /usr/include/resolv.h:157:14: error: array has incomplete element type 'struct sockaddr_in' nsaddr_list[MAXNS]; /*%< address of name server */ ^ /usr/include/resolv.h:156:9: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in ^ /usr/include/resolv.h:171:18: error: field has incomplete type 'struct in_addr' struct in_addr addr; ^ /usr/include/resolv.h:171:10: note: forward declaration of 'struct in_addr' struct in_addr addr; ^ /usr/include/resolv.h:195:21: error: field has incomplete type 'struct sockaddr_in' struct sockaddr_in sin; ^ /usr/include/resolv.h:156:9: note: forward declaration of 'struct sockaddr_in' struct sockaddr_in ^ 3 errors generated. >Fix: --- res.diff begins here --- Index: include/resolv.h =================================================================== --- include/resolv.h (revision 255808) +++ include/resolv.h (working copy) @@ -58,6 +58,7 @@ #include #include #include +#include #include /*% Index: lib/libc/net/resolver.3 =================================================================== --- lib/libc/net/resolver.3 (revision 255808) +++ lib/libc/net/resolver.3 (working copy) @@ -48,9 +48,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h -.In netinet/in.h -.In arpa/nameser.h .In resolv.h .Ft int .Fo res_query --- res.diff begins here --- >Release-Note: >Audit-Trail: >Unformatted: