Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
6ffa87d3
Commit
6ffa87d3
authored
Jul 11, 2007
by
Ramiro Polla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper check for mkstemp().
Originally committed as revision 9596 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
7c9dcd4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
configure
configure
+3
-0
utils.c
libavcodec/utils.c
+3
-3
No files found.
configure
View file @
6ffa87d3
...
@@ -673,6 +673,7 @@ HAVE_LIST="
...
@@ -673,6 +673,7 @@ HAVE_LIST="
machine_ioctl_meteor_h
machine_ioctl_meteor_h
malloc_h
malloc_h
memalign
memalign
mkstemp
mlib
mlib
ppc64
ppc64
sdl
sdl
...
@@ -1507,6 +1508,8 @@ fi
...
@@ -1507,6 +1508,8 @@ fi
check_header byteswap.h
check_header byteswap.h
check_func mkstemp
check_header arpa/inet.h
check_header arpa/inet.h
check_func inet_aton
check_func inet_aton
...
...
libavcodec/utils.c
View file @
6ffa87d3
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include <stdarg.h>
#include <stdarg.h>
#include <limits.h>
#include <limits.h>
#include <float.h>
#include <float.h>
#if
def __MINGW32__
#if
!defined(HAVE_MKSTEMP)
#include <fcntl.h>
#include <fcntl.h>
#endif
#endif
...
@@ -1333,7 +1333,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
...
@@ -1333,7 +1333,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
* and opened file name in **filename. */
* and opened file name in **filename. */
int
av_tempfile
(
char
*
prefix
,
char
**
filename
)
{
int
av_tempfile
(
char
*
prefix
,
char
**
filename
)
{
int
fd
=-
1
;
int
fd
=-
1
;
#if
def __MINGW32__
#if
!defined(HAVE_MKSTEMP)
*
filename
=
tempnam
(
"."
,
prefix
);
*
filename
=
tempnam
(
"."
,
prefix
);
#else
#else
size_t
len
=
strlen
(
prefix
)
+
12
;
/* room for "/tmp/" and "XXXXXX\0" */
size_t
len
=
strlen
(
prefix
)
+
12
;
/* room for "/tmp/" and "XXXXXX\0" */
...
@@ -1344,7 +1344,7 @@ int av_tempfile(char *prefix, char **filename) {
...
@@ -1344,7 +1344,7 @@ int av_tempfile(char *prefix, char **filename) {
av_log
(
NULL
,
AV_LOG_ERROR
,
"ff_tempfile: Cannot allocate file name
\n
"
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"ff_tempfile: Cannot allocate file name
\n
"
);
return
-
1
;
return
-
1
;
}
}
#if
def __MINGW32__
#if
!defined(HAVE_MKSTEMP)
fd
=
open
(
*
filename
,
_O_RDWR
|
_O_BINARY
|
_O_CREAT
,
0444
);
fd
=
open
(
*
filename
,
_O_RDWR
|
_O_BINARY
|
_O_CREAT
,
0444
);
#else
#else
snprintf
(
*
filename
,
len
,
"/tmp/%sXXXXXX"
,
prefix
);
snprintf
(
*
filename
,
len
,
"/tmp/%sXXXXXX"
,
prefix
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment