(Note: This is not a duplicate question)
I'm using the libc function tmpnam
, and getting the following warning:
warning: the use of 'tmpnam' is dangerous, better use 'mkstemp'
My question isn't "how to disable the warning", but rather "what function should I be using instead"? mkstemp
doesn't help, because I'm not trying to create a temporary file - I'm creating a temporary directory. And AFAIK, there isn't an API function for that.
So if I'm not supposed to use tmpnam
, what am I supposed to use?