From owner-freebsd-current@FreeBSD.ORG Thu Aug 12 13:44:29 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A507D16A4CE for ; Thu, 12 Aug 2004 13:44:29 +0000 (GMT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BE7743D1D for ; Thu, 12 Aug 2004 13:44:29 +0000 (GMT) (envelope-from skip.ford@verizon.net) Received: from pool-70-17-33-167.pskn.east.verizon.net ([70.17.33.167]) by out005.verizon.netESMTP <20040812134428.ZKAE3910.out005.verizon.net@pool-70-17-33-167.pskn.east.verizon.net> for ; Thu, 12 Aug 2004 08:44:28 -0500 Date: Thu, 12 Aug 2004 09:44:22 -0400 From: Skip Ford To: freebsd-current@freebsd.org Message-ID: <20040812134422.GA585@lucy.pool-70-17-33-167.pskn.east.verizon.net> Mail-Followup-To: freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [70.17.33.167] at Thu, 12 Aug 2004 08:44:28 -0500 Subject: savecore -z dumps core: linker or libz X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 13:44:29 -0000 With sources from 36 hours ago, linking savecore produces: /usr/bin/ld: Warning: size of symbol `compress' changed from 4 in savecore.o to 27 in /usr/lib/libz.a(compress.o) /usr/bin/ld: Warning: type of symbol `compress' changed from 1 to 2 in /usr/lib/libz.a(compress.o) 'savecore -z' dumps core. 's/compress/compress_core//' as included below works around the problem. Index: sbin/savecore/savecore.c =================================================================== RCS file: /cvs/ncvs/src/sbin/savecore/savecore.c,v retrieving revision 1.68 diff -u -r1.68 savecore.c --- sbin/savecore/savecore.c 28 Feb 2004 10:42:27 -0000 1.68 +++ sbin/savecore/savecore.c 12 Aug 2004 13:14:21 -0000 @@ -88,7 +88,7 @@ /* The size of the buffer used for I/O. */ #define BUFFERSIZE (1024*1024) -int checkfor, compress, clear, force, keep, verbose; /* flags */ +int checkfor, compress_core, clear, force, keep, verbose; /* flags */ int nfound, nsaved, nerr; /* statistics */ extern FILE *zopen(const char *, const char *); @@ -347,7 +347,7 @@ goto closefd; } oumask = umask(S_IRWXG|S_IRWXO); /* Restrict access to the core file.*/ - if (compress) { + if (compress_core) { sprintf(buf, "vmcore.%d.gz", bounds); fp = zopen(buf, "w"); } else { @@ -371,7 +371,7 @@ fclose(info); syslog(LOG_NOTICE, "writing %score to %s", - compress ? "compressed " : "", buf); + compress_core ? "compressed " : "", buf); while (dumpsize > 0) { wl = BUFFERSIZE; @@ -387,7 +387,7 @@ nerr++; goto closeall; } - if (compress) { + if (compress_core) { nw = fwrite(buf, 1, wl, fp); } else { for (nw = 0; nw < nr; nw = he) { @@ -515,7 +515,7 @@ force = 1; break; case 'z': - compress = 1; + compress_core = 1; break; case '?': default: -- Skip