diff options
author | Romain Naour <romain.naour@openwide.fr> | 2014-04-06 14:37:33 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-04-08 14:06:54 +0200 |
commit | a5a4b38c6a43d9da46cdd0244b1aae07d7bcce5c (patch) | |
tree | 91ba37e2b3a71ff2b615c78907cf2ef7d7d08872 /package/cppcms | |
parent | 35cc21e3e15aaebae10f10865c16c849c3b2c453 (diff) | |
download | buildroot-a5a4b38c6a43d9da46cdd0244b1aae07d7bcce5c.tar.gz buildroot-a5a4b38c6a43d9da46cdd0244b1aae07d7bcce5c.zip |
util-linux: add a check for mkostemp()
mkostemp() is missing with older version of uClibc (uClibc <= 0.9.33).
So, we need to check if mkostemp() is available.
If not, we use a wrapper function based on mkstemp() to implement it.
Since util-linux v2.23, mkostemp() is called with O_CLOEXEC flag.
If we use a define to mkstemp() to implement mkostemp(), flags will be
discared.
mkstemp() will pass O_RDWR|O_CREAT|O_EXCL, but not O_CLOEXEC, which
means that the file descriptor will no longer be closed automatically
upon exec().
To avoid to discard the flags, we add a call to fcntl() to set O_CLOEXEC
flag just after mkstemp().
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/cppcms')
0 files changed, 0 insertions, 0 deletions