[FFmpeg-devel] [PATCH] adding _GNU_SOURCE for udp.c compilation

Zdenek Kabelac zdenek.kabelac
Sun Feb 10 17:58:12 CET 2008

2008/2/10, Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> On Sun, Feb 10, 2008 at 04:33:12PM +0100, Zdenek Kabelac wrote:
> > This small patch defines  -D_GNU_SOURCE which is needed for udp.c compilation.
> > (It looks like newest headers do not have this flag enabled now so
> > this compilation breaks otherwise)
> FFmpeg is supposed to be POSIX, defining GNU_SOURCE or similar nonsense
> is far from acceptable.
> You also do not say _why_ compilation fails.

udp.c:199: error: 'NI_MAXSERV' undeclared (first use in this function)
udp.c:199: error: (Each undeclared identifier is reported only once
udp.c:199: error: for each function it appears in.)
udp.c:200: error: 'NI_MAXHOST' undeclared (first use in this function)
udp.c:200: warning: unused variable 'hbuf'
udp.c:199: warning: unused variable 'sbuf'
udp.c: In function 'udp_set_remote_url':

See the netdb.h file for yourself....

As long as NI_MAXSERV and NI_MAXHOST is part of udp.c  _GNU_SOURCE
should be defined - obviously the 'other' fix is to replace these const...


More information about the ffmpeg-devel mailing list