[MPlayer-dev-eng] [PATCH] Fix compilation on OpenBSD

Andrew Savchenko bircoph at gmail.com
Tue Nov 18 10:58:00 CET 2008


Hi,

On Tuesday 18 November 2008 00:45, Diego Biurrun wrote:
[...]
> > 1) socklen_t data type is defined in sys/types.h in OpenBSD,
> > thus compilation fails with the following:
> > =======
> > stream/network.h:29: error: conflicting types for `socklen_t'
> > /usr/include/sys/types.h:161: error: previous declaration of
> > `socklen_t'
> > =======
> > socklen_t.patch fixes this.
>
> Patch is fine, commit anytime.

Applied.

> But I do wonder why this does not cause you problems with
> FFmpeg.  Have you just tested FFmpeg within MPlayer?

As I mentioned on ffmpeg-devel, I just can't compile FFmpeg at all 
due to failed gmake... (I'll try with locally installed gmake-3.81 
later). Our do you mean building FFmpeg inside MPlayer using 
experimental patch you proposed earlier?

> > 2) Include directories reported by pkg-config for theora are
> > not included in $_inc_extra, thus if theora is not installed
> > in standard location, compilation fails due to unknown header
> > file "theora/theora.h". In case on OpenBSD theora's headers
> > are usually installed in the /usr/local/include.
> > theora_local.patch is the fix for this.
>
> Hmmm, /usr/local/include should always be in the search path...

Maybe, I dunno, I suppose some feature of OpenBSD.
By the way I can't find standard include search path specifications 
in gcc manual... And gcc -print-search-dirs says nothing about 
them.

Nevertheless instead of /usr/local/include it may be (in theory) 
/some/very/tricky/patch/to/the/library/header here.

> > --- configure	(revision 27949)
> > +++ configure	(working copy)
> > @@ -6055,6 +6055,7 @@
> >  EOF
> >    for _ld_theora in "`$_pkg_config --silence-errors --libs
> > --cflags theora`" "-ltheora -logg"; do cc_check $_ld_theora &&
> > _ld_extra="$_ld_extra $_ld_theora" \ +                        
> > && _inc_extra="$_inc_extra `$_pkg_config --silence-errors
> > --cflags theora`" \ && _theora=yes && break
> >    done
>
> Hmm, that will subtly break if the pkg-config call fails, but
> Theora is installed.

Agreed. I missed that. What about the following patch?
Should we add similar changes for all pkg-config detected libraries 
where this kind of behaviour may be required?

-- 
Best regards,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: theora_include.patch
Type: text/x-diff
Size: 645 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081118/cf95a2a0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081118/cf95a2a0/attachment.pgp>


More information about the MPlayer-dev-eng mailing list