mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-20 07:48:15 +02:00
avformat/file: guard fd_dup by FD_PROTOCOL or PIPE_PROTOCOL
fd_dup is unused when fd and pipe have been disabled. This also fix build error with wasi since 'dup' isn't available. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
e713a2d85d
commit
cb9c98da16
@ -193,6 +193,7 @@ static int file_check(URLContext *h, int mask)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_FD_PROTOCOL || CONFIG_PIPE_PROTOCOL
|
||||||
static int fd_dup(URLContext *h, int oldfd)
|
static int fd_dup(URLContext *h, int oldfd)
|
||||||
{
|
{
|
||||||
int newfd;
|
int newfd;
|
||||||
@ -215,6 +216,7 @@ static int fd_dup(URLContext *h, int oldfd)
|
|||||||
#endif
|
#endif
|
||||||
return newfd;
|
return newfd;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int file_close(URLContext *h)
|
static int file_close(URLContext *h)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user