[vlc-devel] commit: vlc_network.h: Define AI_NUMERICSERV if not defined. (Pierre d' Herbemont )

git version control git at videolan.org
Fri May 30 08:53:46 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri May 30 08:55:01 2008 +0200| [8af4fbace0fef3c160dbb52acc9af7ad8f8eab79]

vlc_network.h: Define AI_NUMERICSERV if not defined.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8af4fbace0fef3c160dbb52acc9af7ad8f8eab79
---

 include/vlc_network.h         |    5 +++++
 modules/stream_out/standard.c |    5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/vlc_network.h b/include/vlc_network.h
index eb76c58..972090d 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -274,6 +274,11 @@ struct addrinfo
 #  define AI_NUMERICHOST 4
 # endif /* if !HAVE_STRUCT_ADDRINFO */
 
+/* Mac OS X doesn't define that one */
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV 0
+#endif
+
 VLC_EXPORT( const char *, vlc_gai_strerror, ( int ) );
 VLC_EXPORT( int, vlc_getnameinfo, ( const struct sockaddr *, int, char *, int, int *, int ) );
 VLC_EXPORT( int, vlc_getaddrinfo, ( vlc_object_t *, const char *, int, const struct addrinfo *, struct addrinfo ** ) );
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 7320378..6b97d20 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -394,10 +394,7 @@ static int Open( vlc_object_t *p_this )
             .ai_family = AF_UNSPEC,
             .ai_socktype = SOCK_DGRAM,
             .ai_protocol = 0,
-            .ai_flags = AI_NUMERICHOST
-#ifdef AI_NUMERICSERV
-                      | AI_NUMERICSERV
-#endif
+            .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV
         };
         char *shost = var_GetNonEmptyString (p_access, "src-addr");
         char *dhost = var_GetNonEmptyString (p_access, "dst-addr");




More information about the vlc-devel mailing list