Subject: bin/3972: some files of crunchide won't compile on NetBSD/alpha.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@but-b.or.jp>
List: netbsd-bugs
Date: 08/12/1997 12:17:02
>Number: 3972
>Category: bin
>Synopsis: some files of crunchide won't compile on NetBSD/alpha
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 11 20:20:02 1997
>Last-Modified:
>Originator: enami tsugutomo
>Organization:
>Release: NetBSD-current as of 1997 Aug 10
>Environment:
System: NetBSD red-glasses.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (RED_GLASSES) #91: Sun Aug 10 10:04:16 JST 1997 enami@red-glasses.enami.ba2.so-net.or.jp:/usr/src/sys/arch/alpha/compile/RED_GLASSES alpha
>Description:
some files of crunchide won't compile on NetBSD/alpha.
>How-To-Repeat:
Here is make log:
cc -O -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -c /usr/src/usr.bin/crunch/crunchide/exec_ecoff.c
cc1: warnings being treated as errors
/usr/src/usr.bin/crunch/crunchide/exec_ecoff.c: In function `check_ecoff':
/usr/src/usr.bin/crunch/crunchide/exec_ecoff.c:62: warning: implicit declaration of function `read'
*** Error code 1 (continuing)
cc -O -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -c /usr/src/usr.bin/crunch/crunchide/exec_elf64.c
cc1: warnings being treated as errors
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c: In function `xreadatoff':
In file included from /usr/src/usr.bin/crunch/crunchide/exec_elf64.c:40:
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c:77: warning: implicit declaration of function `read'
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c: In function `xwriteatoff':
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c:94: warning: implicit declaration of function `write'
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c: In function `hide_elf64':
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c:152: warning: unused variable `relp'
/usr/src/usr.bin/crunch/crunchide/exec_elf32.c:151: warning: unused variable `relap'
*** Error code 1 (continuing)
`all' not remade because of errors.
>Fix:
1) Include unistd.h to get prototype of `read' and `write'.
2) Remove really unused variable definition; they are actually
defined in inner block. So another fix is not to define them
in the block.
cvs server: Diffing .
Index: exec_ecoff.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/usr.bin/crunch/crunchide/exec_ecoff.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exec_ecoff.c
--- exec_ecoff.c 1997/08/10 14:53:00 1.1.1.1
+++ exec_ecoff.c 1997/08/12 03:09:10
@@ -39,6 +39,7 @@
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include "extern.h"
#if defined(NLIST_ECOFF)
Index: exec_elf32.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/usr.bin/crunch/crunchide/exec_elf32.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exec_elf32.c
--- exec_elf32.c 1997/08/10 14:53:00 1.1.1.1
+++ exec_elf32.c 1997/08/12 03:09:10
@@ -44,6 +44,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <errno.h>
#include "extern.h"
@@ -148,8 +149,6 @@
Elf_Shdr *shdrp = NULL, *symtabshdr, *strtabshdr;
Elf_Sym *symtabp = NULL;
char *strtabp = NULL;
- Elf_RelA *relap = NULL;
- Elf_Rel *relp = NULL;
Elf_Word *symfwmap = NULL, *symrvmap = NULL, nsyms, nlocalsyms, ewi;
struct listelem *relalist = NULL, *rellist = NULL, *tmpl;
ssize_t shdrsize;
>Audit-Trail:
>Unformatted: