Use mktemp instead of tempnam to create the temporary file; addresses

pkg/10191 by Richard Earnshaw.
Patch provided by Dieter Baron.
Bump version to 1.1.
This commit is contained in:
wiz 2001-03-23 13:36:17 +00:00
parent 69af9f98b4
commit 1e3fe5aeb3
2 changed files with 7 additions and 6 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.5 2001/02/25 04:17:39 hubertf Exp $
# $NetBSD: Makefile,v 1.6 2001/03/23 13:36:17 wiz Exp $
DISTNAME= bfd-crunchide-1.0
DISTNAME= bfd-crunchide-1.1
CATEGORIES= cross
MASTER_SITES= # empty
DISTFILES= # empty

View file

@ -1,4 +1,4 @@
/* $NetBSD: crunchide.c,v 1.1.1.1 1999/12/20 05:57:40 sakamoto Exp $ */
/* $NetBSD: crunchide.c,v 1.2 2001/03/23 13:36:18 wiz Exp $ */
/* NetBSD: crunchide.c,v 1.9 1999/01/11 22:40:00 kleink Exp */
/*
@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: crunchide.c,v 1.1.1.1 1999/12/20 05:57:40 sakamoto Exp $");
__RCSID("$NetBSD: crunchide.c,v 1.2 2001/03/23 13:36:18 wiz Exp $");
#endif
#include <unistd.h>
@ -233,7 +233,7 @@ hide_syms(filename, bfdname)
{
int i, n, rv = 0;
bfd *org_bfd = NULL, *new_bfd = NULL;
char *tempname;
char tempname[16];
char **name;
long storage_needed, number_of_symbols;
size_t fn_size;
@ -252,7 +252,8 @@ hide_syms(filename, bfdname)
}
bfdname = bfd_get_target(org_bfd);
tempname = tempnam(".", NULL);
strcpy(tempname, "tmp.XXXXXXX");
mktemp(tempname);
if ((new_bfd = bfd_openw(tempname, bfdname)) == NULL) {
bfd_perror(tempname);
goto err;