On Mon, Aug 29, 2022 at 04:43:19PM +0200, Neil Roberts wrote: > Using file_check for the pipe protocol doesn't make sense. For example, > for a URL like “pipe:0” it would end up checking whether the “pipe:0” > file exists. This patch instead makes it check the access modes on the > corresponding file descriptor using fcntl. > > Signed-off-by: Neil Roberts > --- > libavformat/file.c | 40 +++++++++++++++++++++++++++++++++++++--- > 1 file changed, 37 insertions(+), 3 deletions(-) breaks on mingw64 src/libavformat/file.c: In function ‘pipe_check’: src/libavformat/file.c:411:24: error: implicit declaration of function ‘fcntl’; did you mean ‘rintl’? [-Werror=implicit-function-declaration] int status_flags = fcntl(fd, F_GETFL); ^~~~~ rintl src/libavformat/file.c:411:34: error: ‘F_GETFL’ undeclared (first use in this function) int status_flags = fcntl(fd, F_GETFL); ^~~~~~~ src/libavformat/file.c:411:34: note: each undeclared identifier is reported only once for each function it appears in cc1: some warnings being treated as errors [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer.