[FFmpeg-devel] [PATCH] lavu: add ff_pthread_setname() and use it in various places

Clément Bœsch u at pkh.me
Sat Jan 30 14:23:10 CET 2016


On Sun, Jan 24, 2016 at 07:00:30PM -0300, James Almer wrote:
> On 1/24/2016 6:22 PM, Clément Bœsch wrote:
> > On Sun, Jan 24, 2016 at 10:09:49PM +0100, Michael Niedermayer wrote:
> > [...]
> >> fails to build:
> >> make distclean ; ../configure  --enable-pthreads  --arch=x86_32 --target-os=linux --extra-cflags=-m32 --extra-ldflags=-m32  --enable-cross-compile && make -j12
> >> In file included from libavfilter/pthread.c:30:0:
> >> ffmpeg/libavutil/thread.h: In function ‘ff_thread_setname’:
> >> ffmpeg/libavutil/thread.h:134:5: error: implicit declaration of function ‘pthread_setname_np’ [-Werror=implicit-function-declaration]
> >>
> > 
> > Any idea what could be the cause? Old glibc maybe?
> 
> In any case, i guess the only solution would be to do a configure check
> like the one for pthread_cancel, or a more complete one that checks the
> actual signature of the function.

I added an extra simple check in the attached patch. I wasn't able to make
a more complete check (i was able to compile, link, and even execute
pthread_setname_np("ffmpeg") on linux).

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavu-add-ff_thread_setname-and-use-it-in-various-pla.patch
Type: text/x-diff
Size: 5034 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160130/3587f7bb/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160130/3587f7bb/attachment.sig>


More information about the ffmpeg-devel mailing list