git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
network: use getservbyport() only if available
[ffmpeg.git]
/
libavformat
/
os_support.c
diff --git
a/libavformat/os_support.c
b/libavformat/os_support.c
index
7618708
..
451801f
100644
(file)
--- a/
libavformat/os_support.c
+++ b/
libavformat/os_support.c
@@
-235,8
+235,10
@@
int ff_getnameinfo(const struct sockaddr *sa, int salen,
if (serv && servlen > 0) {
struct servent *ent = NULL;
+#if HAVE_GETSERVBYPORT
if (!(flags & NI_NUMERICSERV))
ent = getservbyport(sin->sin_port, flags & NI_DGRAM ? "udp" : "tcp");
+#endif
if (ent)
snprintf(serv, servlen, "%s", ent->s_name);