os_support: Don't try to return the service name as a string in getnameinfo
authorMartin Storsjö <martin@martin.st>
Wed, 28 Oct 2015 20:19:12 +0000 (22:19 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 30 Oct 2015 08:03:58 +0000 (10:03 +0200)
commit00b62968d079e63bf22028f253ac297292436ebe
treef345972cb9c05b94ec6acea312364cd2bedb7abf
parent567ca142952c5be57e52c149c815dfe5d6ac6d41
os_support: Don't try to return the service name as a string in getnameinfo

Some systems may be lacking getservbyport; the previous ifdef wasn't
quite enough since it still assumed that struct servent was defined,
as pointed out by Clément Gregoire.

Simply remove the possibility to return non-numeric services in
getnameinfo; no caller of getnameinfo within libavformat
currently try to use getnameinfo for retrieving the port number without
NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure
libavformat/os_support.c