[FFmpeg-devel] [PATCH][RFC] -std=c99
Fri Aug 22 13:50:48 CEST 2008
M?ns Rullg?rd wrote:
> Luca Abeni wrote:
> > Hi M?ns,
> > M?ns Rullg?rd wrote:
> > [...]
> >>>> Another solution is probably to define _SVID_SOURCE.
> >>> Yes, I think that would work too. Another option could be defining
> >>> _GNU_SOURCE...
> >> For the love of all that is holy, and some that is not, don't do that.
> > hehe... I do not know why, but I expected a similar reaction ;-)
> >>> I proposed _BSD_SOURCE because I see sockets as a BSD thing, but I am ok
> >>> with any of the three possibilities.
> >>> So, if:
> >>> 1) someone can confirm that defining one of the three symbols mentioned
> >>> above
> >>> fixes the build
> >>> 2) there is an agreement on the symbol that is better to define
> >>> 3) noone is against the fix
> >>> then I'd like to commit the fix in few days.
> >> With glibc, one of the three proposed preprocessor symbols must be defined.
> >> Of these, I prefer _BSD_SOURCE, admittedly for vague reasons. It should
> >> be used only in this file, of course.
> > Ok. So, let's wait until monday so that people have time to discuss, complain,
> > or propose other solutions.
No objection from me.
> > Then, if noone disagrees I'd like to commit the
> > following:
> > diff --git a/libavformat/udp.c b/libavformat/udp.c
> > index effe699..31bf518 100644
> > --- a/libavformat/udp.c
> > +++ b/libavformat/udp.c
> > @@ -24,6 +24,7 @@
> > * UDP protocol
> > */
> > +#define _BSD_SOURCE
> > #include "avformat.h"
> > #include <unistd.h>
> > #include "network.h"
> Go ahead and commit it, but add a comment on the same line stating
> why it's needed. Something like "for struct ip_mreq with glibc"
> should be fine.
More information about the ffmpeg-devel