This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15137] New: linking static version of sem_open gets message "'mktemp' is dangerous, better use `mkstemp'"
- From: "geir at cray dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 12 Feb 2013 17:02:46 +0000
- Subject: [Bug libc/15137] New: linking static version of sem_open gets message "'mktemp' is dangerous, better use `mkstemp'"
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15137
Bug #: 15137
Summary: linking static version of sem_open gets message
"'mktemp' is dangerous, better use `mkstemp'"
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: geir@cray.com
CC: drepper.fsp@gmail.com
Classification: Unclassified
In the following test case that calls sem_open, a link time warning message is
produced when linked statically. sem_open needs to be changed so that this
link time message no longer appears, as it is unacceptable that the use of a
supported system library routine produces this type of link time warning.
$ cat sem_open.c
#include <fcntl.h>
#include <semaphore.h>
#include <errno.h>
int main(int argc, char *argv[])
{
sem_t *mutex;
/* create, initialize semaphore */
if ((mutex = sem_open("mysemaphore", O_CREAT, 0644, 1)) == SEM_FAILED)
perror("semaphore initilization");
return 0;
}
$ gcc -static sem_open.c -lpthread
/usr/lib/../lib64/libpthread.a(sem_open.o): In function `sem_open':
/usr/src/packages/BUILD/glibc-2.11.3/nptl/sem_open.c:333: warning: the use of
`mktemp' is dangerous, better use `mkstemp'
$ gcc sem_open.c -lpthread
$
$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.