[FFmpeg-devel] [PATCH 2/2] lavf/file: check for dirent.h support

Michael Niedermayer michael at niedermayer.cc
Tue Aug 25 03:02:49 CEST 2015


On Fri, Aug 21, 2015 at 02:18:34AM +0200, Mariusz Szczepańczyk wrote:
> On Thu, Jun 25, 2015 at 12:09 PM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
> 
> > On Wed, Jun 24, 2015 at 03:25:18AM +0200, Mariusz Szczepańczyk wrote:
> > > On Tue, Jun 23, 2015 at 8:34 PM, Michael Niedermayer <michaelni at gmx.at>
> > > wrote:
> > >
> > > > On Mon, Jun 22, 2015 at 12:01:33AM +0200, Mariusz Szczepańczyk wrote:
> > > > > ---
> > > > >  configure          |  2 ++
> > > > >  libavformat/file.c | 34 ++++++++++++++++++++++++++++++++++
> > > > >  2 files changed, 36 insertions(+)
> > > >
> > > > this and the previous patch fails to build
> > > >
> > > > make distclean ; ./configure --disable-sdl && make -j12
> > > >
> > > > libavformat/file.c: In function ‘file_read_dir’:
> > > > libavformat/file.c:302:10: error: ‘DT_FIFO’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:302:10: note: each undeclared identifier is reported
> > > > only once for each function it appears in
> > > > libavformat/file.c:305:10: error: ‘DT_CHR’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:308:10: error: ‘DT_DIR’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:311:10: error: ‘DT_BLK’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:314:10: error: ‘DT_REG’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:317:10: error: ‘DT_LNK’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:320:10: error: ‘DT_SOCK’ undeclared (first use in
> > this
> > > > function)
> > > > libavformat/file.c:323:10: error: ‘DT_UNKNOWN’ undeclared (first use in
> > > > this function)
> > > > make: *** [libavformat/file.o] Error 1
> > > > make: *** Waiting for unfinished jobs....
> > > >
> > > > sdl disable is needed to reproduce  as sdls pkgcnonfig adds
> > > > GNU_SOURCE i suspect
> > > >
> > >
> > > Added contraint on _GNU_SOURCE and now it compiles fine on my linux in
> > both
> > > cases (with or without sdl).
> >
> > The code probably should #ifdef DT_... like DT_FIFO
> > also are both variants needed ?
> > are there systems lacking some of the S_IS*() ? or is there some
> > disadvantage in their use ? (i dont know, just asking ...)
> >
> > testing for _GNU_SOURCE is not correct, nothing gurantees that the
> > compiler or headers know or react to _GNU_SOURCE
> >
> 
> Yet another try.
> 
> Completely removed reliance on DT_* and added definitions for some S_* that
> can be missing.

>  configure          |    2 +
>  libavformat/file.c |   80 ++++++++++++++++++++++++++++++++++-------------------
>  2 files changed, 54 insertions(+), 28 deletions(-)
> 47af9bc90efe51f1d94455bdf7e3eafaec6e61e2  0002-lavf-file-check-for-dirent.h-support.patch
> From 820bd4aa5b064861935f8ef9e37a19bf459620c8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Mariusz=20Szczepa=C5=84czyk?= <mszczepanczyk at gmail.com>
> Date: Mon, 29 Jun 2015 00:13:43 +0200
> Subject: [PATCH 2/2] lavf/file: check for dirent.h support

both patches applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150825/cc43e375/attachment.sig>


More information about the ffmpeg-devel mailing list