[Bug c/11758] New: overriding tmpnam() on gcc 3.2.2 - redhat 9/ 'tmpnam is dangerous, better use mkstemp'
bsellers16 at cox dot net
gcc-bugzilla@gcc.gnu.org
Fri Aug 1 06:32:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11758
Summary: overriding tmpnam() on gcc 3.2.2 - redhat 9/ 'tmpnam is
dangerous, better use mkstemp'
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bsellers16 at cox dot net
CC: gcc-bugs at gcc dot gnu dot org
I am running Redhat 9, trying to compile gnewspost-0.6, and I get an error that
causes it to fail compilation. I have reported this to the developer to fix.
It is failing on a line:
fname = g_strdup(tmpnam(NULL));
with the error:
gcc -g -o gnewspost -L/usr/lib -lgthread -lglib -lpthread gnewspost.o app.o
newspost.o session.o prefs.o profile.o -rdynamic -L/usr/lib -L/usr/X11R6/lib
-rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -ldl
-lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -lglib -lpthread
session.o(.text+0x18dc): In function `_make_zero_file':
/home/sellers/software/gnewspost-0.6/src/session.c:450: the use of `tmpnam' is
dangerous, better use `mkstemp'
session.o(.text+0x190d):/home/sellers/software/gnewspost-0.6/src/session.c:452:
undefined reference to `errno'
collect2: ld returned 1 exit status
make[2]: *** [gnewspost] Error 1
How can I override the error, so I can compile this code? I tried -w and
several other flags. TIA.
More information about the Gcc-bugs
mailing list