Martin Storsjö <[email protected]> writes: > This avoids warnings if there already exists a definition. > > This is the case on windows, where the getaddrinfo isn't available > and linked to (and we use our fallbacks instead, which actually > try to use the proper getaddrinfo version if found at runtime), > but gai_strerror still exists as a define. > --- > libavformat/network.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavformat/network.h b/libavformat/network.h > index 72d01d2..000a6fc 100644 > --- a/libavformat/network.h > +++ b/libavformat/network.h > @@ -150,6 +150,9 @@ const char *ff_gai_strerror(int ecode); > #define getaddrinfo ff_getaddrinfo > #define freeaddrinfo ff_freeaddrinfo > #define getnameinfo ff_getnameinfo > +#ifdef gai_strerror > +#undef gai_strerror > +#endif
No need for the ifdef. It is not an error to undef something that isn't defined. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
