[FFmpeg-devel] [PATCH] adding _GNU_SOURCE for udp.c compilation
Sun Feb 10 18:47:49 CET 2008
On Sun, Feb 10, 2008 at 05:58:12PM +0100, Zdenek Kabelac wrote:
> 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....
Well in my header file (gentoo and debian) they are claimed to be part of POSIX1.g, so they
are not under a GNU ifdef.
Though I admit I could not find it in the POSIX specs I had lying
There is no such problem with the BSD header either.
> 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...
Since they are rather arbitrary there should not be a problem in
defining them if they are not already, though possibly the maintainer
(which I am not) would like to know which system you are using, just
to verify it's not something you broke or so ;-)
More information about the ffmpeg-devel