When using mkstemp() in my C source, I get the gcc warning:
warning: implicit declaration of function ‘mkstemp’
Why?
I use gcc 6.4.0 on a debian GNU/Linux system.
<stdlib.h> is included. I use other POSIX functions (such as
ftruncate() and open()) that are not part of ISO C in the same source
file, but get a warning for mkstemp() only.
I tried using -D_POSIX_C_SOURCE=200112L, but still get the warning.
Philipp Klaus Krause <pkk@spth.de> writes:
When using mkstemp() in my C source, I get the gcc warning:
warning: implicit declaration of function ‘mkstemp’
Why?
I use gcc 6.4.0 on a debian GNU/Linux system.
<stdlib.h> is included. I use other POSIX functions (such as
ftruncate() and open()) that are not part of ISO C in the same source
file, but get a warning for mkstemp() only.
I tried using -D_POSIX_C_SOURCE=200112L, but still get the warning.
WFM on an up-to-date sid install. What’s your test case?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 402 |
Nodes: | 16 (2 / 14) |
Uptime: | 21:02:10 |
Calls: | 8,395 |
Calls today: | 3 |
Files: | 13,168 |
Messages: | 5,902,763 |