diff mbox

[FFmpeg-devel,2/2] network: Define ENOTCONN as WSAENOTCONN if not defined

Message ID 20191211122123.31156-2-martin@martin.st
State Accepted
Commit 6569e9505c781468092c15fa84d034c9e37d26ca
Headers show

Commit Message

Martin Storsjö Dec. 11, 2019, 12:21 p.m. UTC
This fixes compilation with old mingw.org toolchains, which has got
much fewer errno.h entries.
---
There's still a couple fate instances that use mingw.org headers/libs,
and this is the only detail that currently stops them from building.
---
 libavformat/network.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Carl Eugen Hoyos Dec. 11, 2019, 2:38 p.m. UTC | #1
Am Mi., 11. Dez. 2019 um 13:21 Uhr schrieb Martin Storsjö <martin@martin.st>:
>
> This fixes compilation with old mingw.org toolchains, which has got
> much fewer errno.h entries.
> ---
> There's still a couple fate instances that use mingw.org headers/libs,
> and this is the only detail that currently stops them from building.
> ---
>  libavformat/network.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/network.h b/libavformat/network.h
> index 7f467304a8..71347e815b 100644
> --- a/libavformat/network.h
> +++ b/libavformat/network.h
> @@ -50,6 +50,9 @@
>  #ifndef EINPROGRESS
>  #define EINPROGRESS     WSAEINPROGRESS
>  #endif
> +#ifndef ENOTCONN
> +#define ENOTCONN        WSAENOTCONN
> +#endif

Looks very useful.

Please commit, Carl Eugen
diff mbox

Patch

diff --git a/libavformat/network.h b/libavformat/network.h
index 7f467304a8..71347e815b 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -50,6 +50,9 @@ 
 #ifndef EINPROGRESS
 #define EINPROGRESS     WSAEINPROGRESS
 #endif
+#ifndef ENOTCONN
+#define ENOTCONN        WSAENOTCONN
+#endif
 
 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)