[FFmpeg-devel] [PATCH] compilation fix Solaris nanosleep

Måns Rullgård mans
Mon Feb 16 11:44:12 CET 2009


Fabian Groffen <grobian at gentoo.org> writes:

> On 16-02-2009 02:18:25 +0100, Diego Biurrun wrote:
>> On Sun, Feb 15, 2009 at 02:56:12PM +0100, Fabian Groffen wrote:
>> > nanosleep is found in librt on Solaris, patch attached.
>> > 
>> > /Gentoo/var/tmp/portage/media-video/ffmpeg-0.4.9_p20090201/work/ffmpeg/libavdevice/libavdevice.so: undefined reference to `nanosleep'
>> > collect2: ld returned 1 exit status
>> > 
>> > * grobian at gentoo.org: the use of nanosleep requires librealtime (-lrt)
>> >                       on Solaris, OpenSolaris however doesn't need it
>> >                       anymore
>> 
>> Which begs for the question: Will this work on OpenSolaris?
>
> I tested that, and yes it works on (64-bits) OpenSolaris too, the
> library is still around there.  It doesn't break.  If you have access to
> the CHOST, it would be possible to check for >= *-solaris2.11 and skip
> -lrt there.

A better option would be to check for it with and without -lrt
regardless of OS.  We already do similar things for some other
functions.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list