Commit b051a4b5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

posix fs: define vlc_cloexec when mkostemp does not exist

On Android, for 64 bits, O_CLOEXEC is defined, accept4 exists, but not

Therefore, in vlc_mkstemp we go to the fallback that calls vlc_cloexec,
but we don't define it, because we have accept4
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 2e5cbf35
......@@ -49,7 +49,7 @@
#include <vlc_common.h>
#include <vlc_fs.h>
#ifndef HAVE_ACCEPT4
#if !defined(HAVE_ACCEPT4) || !defined HAVE_MKOSTEMP
static inline void vlc_cloexec(int fd)
fcntl(fd, F_SETFD, FD_CLOEXEC | fcntl(fd, F_GETFD));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment