From john_m_cooper@yahoo.com  Mon Jun 18 16:01:31 2007
Return-Path: <john_m_cooper@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 200E116A400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Jun 2007 16:01:31 +0000 (UTC)
	(envelope-from john_m_cooper@yahoo.com)
Received: from smtp108.biz.mail.re2.yahoo.com (smtp108.biz.mail.re2.yahoo.com [206.190.52.47])
	by mx1.freebsd.org (Postfix) with SMTP id C238D13C465
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Jun 2007 16:01:30 +0000 (UTC)
	(envelope-from john_m_cooper@yahoo.com)
Received: (qmail 73733 invoked from network); 18 Jun 2007 15:34:50 -0000
Received: from unknown (HELO borgdemon2.hsd1.md.comcast.net) (j.m.cooper@borgsdemons.com@69.251.16.205 with login)
  by smtp108.biz.mail.re2.yahoo.com with SMTP; 18 Jun 2007 15:34:50 -0000
Received: from borgdemon2.hds1.md.comcast.net (localhost [127.0.0.1])
	by borgdemon2.hsd1.md.comcast.net (Postfix) with ESMTP id D164B5CA5
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 18 Jun 2007 11:34:48 -0400 (EDT)
Message-Id: <1182180888.46148@borgdemon2.hds1.md.comcast.net>
Date: Mon, 18 Jun 2007 11:34:48 -0400
From: "John Merryweather Cooper" <john_m_cooper@yahoo.com>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Subject: WARN Error in FreeBSD 6.2-STABLE (/usr/src/lib/libc/rpc/getpublickey.c)
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify:

>Number:         113825
>Category:       bin
>Synopsis:       [patch] [libc] [ggated] Fix -STABLE build with -fno-strict-aliasing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 18 16:10:05 GMT 2007
>Closed-Date:    
>Last-Modified:  Mon Dec 29 19:02:08 UTC 2008
>Originator:     John Merryweather Cooper
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:


System: FreeBSD 6.2-STABLE #51: Wed Jun 13 11:14:26 EDT 2007
    root@borgdemon2.hsd1.md.comcast.net:/usr/obj/usr/src/sys/P4



>Description:


When building world after recently CVSup'ing, the build stops with the following error

cc -O -pipe -march=pentium4 -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/obj/usr/src/lib/libc -I/usr/src/lib/libc/resolv -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /usr/src/lib/libc/rpc/getpublickey.c
In file included from /usr/src/lib/libc/rpc/getpublickey.c:178:
/usr/src/lib/libc/rpc/getpublickey.c: In function `getpublickey':
/usr/src/lib/libc/rpc/getpublickey.c:70: warning: passing arg 1 of `__getpublickey_real' discards qualifiers from pointer target type
*** Error code 1

Stop in /usr/src/lib/libc.
*** Error code 1

Stop in /usr/src/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1



>How-To-Repeat:


# cd /usr/src
# make buildworld



>Fix:


either the -Werror flag needs to be pulled of this compile, or a fix to the underlying casting is necessary.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Tue Jun 19 11:08:32 UTC 2007 
State-Changed-Why:  

Please report kernel compile failures on the appropriate mailing list, 
in this case, freebsd-stable.  Build failures tend to get fixed very 
quickly due to the high number of developers who track the latest code, 
and the automated tinderboxes that continually run builds. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113825 

From: John Merryweather Cooper <john_m_cooper@yahoo.com>
To: FreeBSD gnats submit <FreeBSD-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: misc/113825: WARN Error in FreeBSD 6.2-STABLE	(/usr/src/lib/libc/rpc/getpublickey.c)
Date: Tue, 19 Jun 2007 07:01:51 -0400

 This is a multi-part message in MIME format.
 --------------050009030901060002060109
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Patches attached.  With these patches, make buildworld runs to 
 completion with CFLAGS=-O -pipe.
 
 jmc
 
 
 --------------050009030901060002060109
 Content-Type: text/plain;
  name="patch-csup"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-csup"
 
 # Patch for misc/113825 for csup
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -c 'contrib/csup/proto.c.old' 'contrib/csup/proto.c'
 Index: ./contrib/csup/proto.c.old
 *** ./contrib/csup/proto.c.old	Tue Jun 19 04:29:42 2007
 --- ./contrib/csup/proto.c	Tue Jun 19 05:31:31 2007
 ***************
 *** 68,74 ****
   };
   
   static void		 killer_start(struct killer *, struct mux *);
 ! static void		*killer_run(void *);
   static void		 killer_stop(struct killer *);
   
   static int		 proto_waitconnect(int);
 --- 68,74 ----
   };
   
   static void		 killer_start(struct killer *, struct mux *);
 ! static void		 killer_run(void *);
   static void		 killer_stop(struct killer *);
   
   static int		 proto_waitconnect(int);
 ***************
 *** 963,968 ****
 --- 963,970 ----
   
   /* Start the killer thread.  It is used to protect against some signals
      during the multi-threaded run so that we can gracefully fail.  */
 + typedef void *(*start_routine)(void *);
 + 
   static void
   killer_start(struct killer *k, struct mux *m)
   {
 ***************
 *** 976,988 ****
   	sigaddset(&k->sigset, SIGTERM);
   	sigaddset(&k->sigset, SIGPIPE);
   	pthread_sigmask(SIG_BLOCK, &k->sigset, NULL);
 ! 	error = pthread_create(&k->thread, NULL, killer_run, k);
   	if (error)
   		err(1, "pthread_create");
   }
   
   /* The main loop of the killer thread. */
 ! static void *
   killer_run(void *arg)
   {
   	struct killer *k;
 --- 978,991 ----
   	sigaddset(&k->sigset, SIGTERM);
   	sigaddset(&k->sigset, SIGPIPE);
   	pthread_sigmask(SIG_BLOCK, &k->sigset, NULL);
 ! 	error = pthread_create(&k->thread, NULL, (start_routine)killer_run, k);
   	if (error)
   		err(1, "pthread_create");
   }
   
   /* The main loop of the killer thread. */
 ! 
 ! static void
   killer_run(void *arg)
   {
   	struct killer *k;
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 06:52:53 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'contrib/csup/proto.c.old' 25477 1182245491 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 06:52:53 2007] ####
 #### Patch checksum: 96 2948 4469 ####
 #### Checksum: 114 3601 58469 ####
 
 --------------050009030901060002060109
 Content-Type: text/plain;
  name="patch-ggated"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-ggated"
 
 # Patch for misc/113825 for ggated
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -c 'sbin/ggate/ggated/ggated.c.old' 'sbin/ggate/ggated/ggated.c'
 Index: ./sbin/ggate/ggated/ggated.c.old
 *** ./sbin/ggate/ggated/ggated.c.old	Mon Jun 18 23:05:16 2007
 --- ./sbin/ggate/ggated/ggated.c	Mon Jun 18 23:08:02 2007
 ***************
 *** 756,761 ****
 --- 756,762 ----
   		error = pthread_mutex_unlock(&outqueue_mtx);
   		assert(error == 0);
   	}
 + 	return arg;
   }
   
   static void *
 ***************
 *** 810,815 ****
 --- 811,817 ----
   		}
   		free(req);
   	}
 + 	return arg;
   }
   
   static void
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 06:56:44 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'sbin/ggate/ggated/ggated.c.old' 25474 1182222482 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 06:56:44 2007] ####
 #### Patch checksum: 58 1777 40909 ####
 #### Checksum: 76 2433 29595 ####
 
 --------------050009030901060002060109
 Content-Type: text/plain;
  name="patch-ip6fw"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-ip6fw"
 
 # Patch for misc/113825 for ip6fw
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -c 'sbin/ip6fw/ip6fw.c.old' 'sbin/ip6fw/ip6fw.c'
 Index: ./sbin/ip6fw/ip6fw.c.old
 Prereq:  1.1.2.2.2.2 
 *** ./sbin/ip6fw/ip6fw.c.old	Tue Jun 19 00:59:48 2007
 --- ./sbin/ip6fw/ip6fw.c	Tue Jun 19 01:14:33 2007
 ***************
 *** 1112,1118 ****
   				if (!ac)
   					show_usage("missing argument"
   					    " for ``icmptypes''");
 ! 				fill_icmptypes(rule.fw_icmp6types,
   				    av, &rule.fw_flg);
   				av++; ac--; continue;
   			}
 --- 1112,1118 ----
   				if (!ac)
   					show_usage("missing argument"
   					    " for ``icmptypes''");
 ! 				fill_icmptypes((u_long *)rule.fw_icmp6types,
   				    av, &rule.fw_flg);
   				av++; ac--; continue;
   			}
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 06:57:45 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'sbin/ip6fw/ip6fw.c.old' 35300 1182230073 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 06:57:45 2007] ####
 #### Patch checksum: 56 1919 49188 ####
 #### Checksum: 74 2574 37750 ####
 
 --------------050009030901060002060109
 Content-Type: text/plain;
  name="patch-rpc"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-rpc"
 
 # Second patch for misc/113825 for rpc (getpublickey.c)
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -c 'lib/libc/rpc/getpublickey.c.old' 'lib/libc/rpc/getpublickey.c'
 Index: ./lib/libc/rpc/getpublickey.c.old
 Prereq:  1.10 
 *** ./lib/libc/rpc/getpublickey.c.old	Mon Jun 18 18:25:14 2007
 --- ./lib/libc/rpc/getpublickey.c	Mon Jun 18 18:31:07 2007
 ***************
 *** 65,71 ****
    */
   int
   __getpublickey_real(netname, publickey)
 ! 	char *netname;
   	char *publickey;
   {
   	char lookup[3 * HEXKEYBYTES];
 --- 65,71 ----
    */
   int
   __getpublickey_real(netname, publickey)
 ! 	const char *netname;
   	char *publickey;
   {
   	char lookup[3 * HEXKEYBYTES];
 ***************
 *** 92,98 ****
   
   int
   getpublicandprivatekey(key, ret)
 ! 	char *key;
   	char *ret;
   {
   	char buf[1024];	/* big enough */
 --- 92,98 ----
   
   int
   getpublicandprivatekey(key, ret)
 ! 	const char *key;
   	char *ret;
   {
   	char buf[1024];	/* big enough */
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 06:55:31 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'lib/libc/rpc/getpublickey.c.old' 4227 1182205867 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 06:55:31 2007] ####
 #### Patch checksum: 73 2105 1931 ####
 #### Checksum: 91 2781 57998 ####
 
 --------------050009030901060002060109
 Content-Type: text/plain;
  name="patch-rpc-auth"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-rpc-auth"
 
 # First patch for misc/113825 for rpc (auth.h)
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -c 'include/rpc/auth.h.old' 'include/rpc/auth.h'
 Index: ./include/rpc/auth.h.old
 Prereq:  1.17 
 *** ./include/rpc/auth.h.old	Mon Jun 18 19:54:59 2007
 --- ./include/rpc/auth.h	Mon Jun 18 21:07:43 2007
 ***************
 *** 299,305 ****
    */
   __BEGIN_DECLS
   extern int getpublickey (const char *, char *);
 ! extern int getpublicandprivatekey (char *, char *);
   extern int getsecretkey (char *, char *, char *);
   __END_DECLS
   
 --- 299,305 ----
    */
   __BEGIN_DECLS
   extern int getpublickey (const char *, char *);
 ! extern int getpublicandprivatekey (const char *, char *);
   extern int getsecretkey (char *, char *, char *);
   __END_DECLS
   
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 06:54:14 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'include/rpc/auth.h.old' 10401 1182215263 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 06:54:14 2007] ####
 #### Patch checksum: 56 1912 53784 ####
 #### Checksum: 74 2580 43450 ####
 
 --------------050009030901060002060109--
State-Changed-From-To: closed->open 
State-Changed-By: gavin 
State-Changed-When: Tue Jun 19 16:48:55 UTC 2007 
State-Changed-Why:  

Reopen, closed in error.  Turns out (through private email) that this 
is a failure to build when -fno-strict-aliasing is specified, which 
the submitter has now supplied patches to fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113825 

From: John Merryweather Cooper <john_m_cooper@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: John Merryweather Cooper <john_m_cooper@yahoo.com>
Subject: Re: misc/113825: WARN Error in FreeBSD	6.2-STABLE	(/usr/src/lib/libc/rpc/getpublickey.c)
Date: Sat, 23 Jun 2007 05:15:27 -0400

 This is a multi-part message in MIME format.
 --------------010006010906090902030702
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Unified diff versions of the patches.
 
 jmc
 
 
 --------------010006010906090902030702
 Content-Type: text/plain;
  name="patch-csup"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-csup"
 
 # misc/113825
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -ruN 'contrib/csup/proto.c.old' 'contrib/csup/proto.c'
 Index: ./contrib/csup/proto.c.old
 --- ./contrib/csup/proto.c.old	Tue Jun 19 04:29:42 2007
 +++ ./contrib/csup/proto.c	Tue Jun 19 05:31:31 2007
 @@ -68,7 +68,7 @@
  };
  
  static void		 killer_start(struct killer *, struct mux *);
 -static void		*killer_run(void *);
 +static void		 killer_run(void *);
  static void		 killer_stop(struct killer *);
  
  static int		 proto_waitconnect(int);
 @@ -963,6 +963,8 @@
  
  /* Start the killer thread.  It is used to protect against some signals
     during the multi-threaded run so that we can gracefully fail.  */
 +typedef void *(*start_routine)(void *);
 +
  static void
  killer_start(struct killer *k, struct mux *m)
  {
 @@ -976,13 +978,14 @@
  	sigaddset(&k->sigset, SIGTERM);
  	sigaddset(&k->sigset, SIGPIPE);
  	pthread_sigmask(SIG_BLOCK, &k->sigset, NULL);
 -	error = pthread_create(&k->thread, NULL, killer_run, k);
 +	error = pthread_create(&k->thread, NULL, (start_routine)killer_run, k);
  	if (error)
  		err(1, "pthread_create");
  }
  
  /* The main loop of the killer thread. */
 -static void *
 +
 +static void
  killer_run(void *arg)
  {
  	struct killer *k;
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 07:31:02 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'contrib/csup/proto.c.old' 25477 1182245491 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 07:31:02 2007] ####
 #### Patch checksum: 73 2412 32655 ####
 #### Checksum: 91 3047 19426 ####
 
 --------------010006010906090902030702
 Content-Type: text/plain;
  name="patch-ggated"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-ggated"
 
 # misc/113825
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -ruN 'sbin/ggate/ggated/ggated.c.old' 'sbin/ggate/ggated/ggated.c'
 Index: ./sbin/ggate/ggated/ggated.c.old
 --- ./sbin/ggate/ggated/ggated.c.old	Mon Jun 18 23:05:16 2007
 +++ ./sbin/ggate/ggated/ggated.c	Mon Jun 18 23:08:02 2007
 @@ -756,6 +756,7 @@
  		error = pthread_mutex_unlock(&outqueue_mtx);
  		assert(error == 0);
  	}
 +	return arg;
  }
  
  static void *
 @@ -810,6 +811,7 @@
  		}
  		free(req);
  	}
 +	return arg;
  }
  
  static void
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 07:35:00 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'sbin/ggate/ggated/ggated.c.old' 25474 1182222482 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 07:35:00 2007] ####
 #### Patch checksum: 54 1705 38343 ####
 #### Checksum: 72 2340 25117 ####
 
 --------------010006010906090902030702
 Content-Type: text/plain;
  name="patch-ip6fw"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-ip6fw"
 
 # misc/113825
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -ruN 'sbin/ip6fw/ip6fw.c.old' 'sbin/ip6fw/ip6fw.c'
 Index: ./sbin/ip6fw/ip6fw.c.old
 Prereq:  1.1.2.2.2.2 
 --- ./sbin/ip6fw/ip6fw.c.old	Tue Jun 19 00:59:48 2007
 +++ ./sbin/ip6fw/ip6fw.c	Tue Jun 19 01:14:33 2007
 @@ -1112,7 +1112,7 @@
  				if (!ac)
  					show_usage("missing argument"
  					    " for ``icmptypes''");
 -				fill_icmptypes(rule.fw_icmp6types,
 +				fill_icmptypes((u_long *)rule.fw_icmp6types,
  				    av, &rule.fw_flg);
  				av++; ac--; continue;
  			}
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 07:36:03 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'sbin/ip6fw/ip6fw.c.old' 35300 1182230073 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 07:36:03 2007] ####
 #### Patch checksum: 48 1731 38403 ####
 #### Checksum: 66 2366 25176 ####
 
 --------------010006010906090902030702
 Content-Type: text/plain;
  name="patch-rpc"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-rpc"
 
 # misc/113825
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -ruN 'lib/libc/rpc/getpublickey.c.old' 'lib/libc/rpc/getpublickey.c'
 Index: ./lib/libc/rpc/getpublickey.c.old
 Prereq:  1.10 
 --- ./lib/libc/rpc/getpublickey.c.old	Mon Jun 18 18:25:14 2007
 +++ ./lib/libc/rpc/getpublickey.c	Mon Jun 18 18:31:07 2007
 @@ -65,7 +65,7 @@
   */
  int
  __getpublickey_real(netname, publickey)
 -	char *netname;
 +	const char *netname;
  	char *publickey;
  {
  	char lookup[3 * HEXKEYBYTES];
 @@ -92,7 +92,7 @@
  
  int
  getpublicandprivatekey(key, ret)
 -	char *key;
 +	const char *key;
  	char *ret;
  {
  	char buf[1024];	/* big enough */
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 07:34:09 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'lib/libc/rpc/getpublickey.c.old' 4227 1182205867 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 07:34:09 2007] ####
 #### Patch checksum: 57 1826 48921 ####
 #### Checksum: 75 2461 35705 ####
 
 --------------010006010906090902030702
 Content-Type: text/plain;
  name="patch-rpc-auth"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="patch-rpc-auth"
 
 # misc/113825
 # 
 # To apply this patch:
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'applypatch' program with this patch file as input.
 #
 # If you do not have 'applypatch', it is part of the 'makepatch' package
 # that you can fetch from the Comprehensive Perl Archive Network:
 # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
 # In the above URL, 'x' should be 2 or higher.
 #
 # To apply this patch without the use of 'applypatch':
 # STEP 1: Chdir to the source directory.
 # STEP 2: Run the 'patch' program with this file as input.
 #
 #### End of Preamble ####
 
 #### Patch data follows ####
 diff -ruN 'include/rpc/auth.h.old' 'include/rpc/auth.h'
 Index: ./include/rpc/auth.h.old
 Prereq:  1.17 
 --- ./include/rpc/auth.h.old	Mon Jun 18 19:54:59 2007
 +++ ./include/rpc/auth.h	Mon Jun 18 21:07:43 2007
 @@ -299,7 +299,7 @@
   */
  __BEGIN_DECLS
  extern int getpublickey (const char *, char *);
 -extern int getpublicandprivatekey (char *, char *);
 +extern int getpublicandprivatekey (const char *, char *);
  extern int getsecretkey (char *, char *, char *);
  __END_DECLS
  
 #### End of Patch data ####
 
 #### ApplyPatch data follows ####
 # Data version        : 1.0
 # Date generated      : Tue Jun 19 07:33:09 2007
 # Generated by        : makepatch 2.03
 # Recurse directories : Yes
 # Excluded files      : (\A|/).*\~\Z
 #                       (\A|/).*\.a\Z
 #                       (\A|/).*\.bak\Z
 #                       (\A|/).*\.BAK\Z
 #                       (\A|/).*\.elc\Z
 #                       (\A|/).*\.exe\Z
 #                       (\A|/).*\.gz\Z
 #                       (\A|/).*\.ln\Z
 #                       (\A|/).*\.o\Z
 #                       (\A|/).*\.obj\Z
 #                       (\A|/).*\.olb\Z
 #                       (\A|/).*\.old\Z
 #                       (\A|/).*\.orig\Z
 #                       (\A|/).*\.rej\Z
 #                       (\A|/).*\.so\Z
 #                       (\A|/).*\.Z\Z
 #                       (\A|/)\.del\-.*\Z
 #                       (\A|/)\.make\.state\Z
 #                       (\A|/)\.nse_depinfo\Z
 #                       (\A|/)core\Z
 #                       (\A|/)tags\Z
 #                       (\A|/)TAGS\Z
 # p 'include/rpc/auth.h.old' 10401 1182215263 0100644
 #### End of ApplyPatch data ####
 
 #### End of Patch kit [created: Tue Jun 19 07:33:09 2007] ####
 #### Patch checksum: 48 1735 41901 ####
 #### Checksum: 66 2370 28675 ####
 
 --------------010006010906090902030702--

From: John Merryweather Cooper <john_m_cooper@yahoo.com>
To: bug-followup@FreeBSD.org, john_m_cooper@yahoo.com
Cc:  
Subject: Re: kern/113825: [patch][libc][ggated] Fix STABLE build with -fno-strict-aliasing (or -Werror on -CURRENT)
Date: Mon, 19 Nov 2007 09:04:53 -0800 (PST)

 Note that some of these fixes in the patches would have equal utility applied to -CURRENT breakage on TINDERBOX because of -Werror.
 
 jmc
 
 
 
>Unformatted:
