Date: Thu, 12 Aug 2004 09:44:22 -0400 From: Skip Ford <skip.ford@verizon.net> To: freebsd-current@freebsd.org Subject: savecore -z dumps core: linker or libz Message-ID: <20040812134422.GA585@lucy.pool-70-17-33-167.pskn.east.verizon.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040812134422.GA585>