diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2024-06-30 18:33:19 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-07-16 22:50:21 +0800 |
commit | cb9c98da16e8412046835ebc0d167a4e09909df0 (patch) | |
tree | 1e1facf483709a99699ad4aff788d7e56c0996ab /libavformat/file.c | |
parent | e713a2d85dad51705a892243170dfbe929b6515a (diff) | |
download | ffmpeg-cb9c98da16e8412046835ebc0d167a4e09909df0.tar.gz |
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>
Diffstat (limited to 'libavformat/file.c')
-rw-r--r-- | libavformat/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index 3fc1e741f2..6a66040b65 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -193,6 +193,7 @@ static int file_check(URLContext *h, int mask) return ret; } +#if CONFIG_FD_PROTOCOL || CONFIG_PIPE_PROTOCOL static int fd_dup(URLContext *h, int oldfd) { int newfd; @@ -215,6 +216,7 @@ static int fd_dup(URLContext *h, int oldfd) #endif return newfd; } +#endif static int file_close(URLContext *h) { |