Commit 5746f910 authored by Michael Niedermayer's avatar Michael Niedermayer

av_tempfile: handle missing O_BINARY

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c9833fc3
......@@ -147,6 +147,9 @@ int av_tempfile(const char *prefix, char **filename) {
return -1;
}
#if !HAVE_MKSTEMP
# ifndef O_BINARY
# define O_BINARY 0
# endif
fd = open(*filename, O_RDWR | O_BINARY | O_CREAT, 0444);
#else
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
......
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