Bug#377310: gcc: [inaccurate] warning: the use of `mktemp' is dangerous, better use `mkstemp'

Jari Aalto+mail.linux jari.aalto at cante.net
Tue Jul 11 07:14:14 UTC 2006

| Jari Aalto wrote:
| > Package: gcc
| > Version: 4:4.1.1-3
| > Severity: normal
| > 
| > While compiling binutils-2.17 from (Debian) sources, gcc reports following:
| > 
| >     bucomm.o: In function `make_tempname':
| >     /usr/src/net/deb/src/binutils-2.17/binutils/bucomm.c:426: warning: the use of `mktemp' is dangerous, better use `mkstemp'
| > 
| > 
| > The proper fix is to use `mkdtemp' in the code, but the error message
| > does not tell this.
| FYI, in the case of binutils mkdtemp is not the proper fix, because
| it has to be bootstrappable on machines without mkdtemp support.
| In the general case it might be still no good idea, the manpage for
| mkdtemp claims it is non-standard (glibc/OpenBSD only).

If the ./configure script can detect the presence of glibc,
then I assume the mkdtemp etc. could be taken into use and
in other systems use the default.


More information about the Pkg-gnome-maintainers mailing list