[Bug c/11758] New: overriding tmpnam() on gcc 3.2.2 - redhat 9/ 'tmpnam is dangerous, better use mkstemp'
Zack Weinberg
zack@codesourcery.com
Fri Aug 1 07:30:00 GMT 2003
"bsellers16 at cox dot net" <gcc-bugzilla@gcc.gnu.org> writes:
> session.o(.text+0x18dc): In function `_make_zero_file':
> /home/sellers/software/gnewspost-0.6/src/
> session.o(.text+0x190d):/home/sellers/software/gnewspost-0.6/src/
>
> 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.
You cannot override the error.
It is, after all, an *error*,
not a warning.
However, the error is not
what you think it is.
This is the error:
session.c:452: undefined reference to `errno'
which indicates that session.c declared errno itself
("extern int errno;")
instead of including <errno.h>.
It is disappointing to see this mistake
still being made in presumably modern code
(using gtk etc)
but eh.
The other message
session.c:450: the use of `tmpnam' is dangerous, better use `mkstemp'
is a warning,
despite the lack of the word "warning".
You cannot make it go away,
because it indicates a security hole.
But you will still be able to link the program
if you fix the other bug.
zw
More information about the Gcc-bugs
mailing list