X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fos_support.h;h=5e6b32d2dc1fc9548826ff8ab1643c4faffa58ff;hb=cb789fd2b34864df30bc4b664cfee632dca0a1e4;hp=7a56dc9a7c1e22a26e5ae5af6a3190d5d047296e;hpb=185aa5e896e15ae96145609944bfc6bbb239bc64;p=ffmpeg diff --git a/libavformat/os_support.h b/libavformat/os_support.h index 7a56dc9a7c1..5e6b32d2dc1 100644 --- a/libavformat/os_support.h +++ b/libavformat/os_support.h @@ -76,17 +76,7 @@ static inline int is_dos_path(const char *path) return 0; } -#if defined(__OS2__) -#define SHUT_RD 0 -#define SHUT_WR 1 -#define SHUT_RDWR 2 -#endif - #if defined(_WIN32) -#define SHUT_RD SD_RECEIVE -#define SHUT_WR SD_SEND -#define SHUT_RDWR SD_BOTH - #ifndef S_IRUSR #define S_IRUSR S_IREAD #endif @@ -96,6 +86,19 @@ static inline int is_dos_path(const char *path) #endif #if CONFIG_NETWORK +#if defined(_WIN32) +#define SHUT_RD SD_RECEIVE +#define SHUT_WR SD_SEND +#define SHUT_RDWR SD_BOTH +#else +#include +#if !defined(SHUT_RD) /* OS/2, DJGPP */ +#define SHUT_RD 0 +#define SHUT_WR 1 +#define SHUT_RDWR 2 +#endif +#endif + #if !HAVE_SOCKLEN_T typedef int socklen_t; #endif