diff --git a/media-video/ffmpeg/patches/ffmpeg-6.1.2.patchset b/media-video/ffmpeg/patches/ffmpeg-6.1.2.patchset index 9131538cb..2a7d9a342 100644 --- a/media-video/ffmpeg/patches/ffmpeg-6.1.2.patchset +++ b/media-video/ffmpeg/patches/ffmpeg-6.1.2.patchset @@ -47,3 +47,33 @@ index 4a291d1..57f1944 100755 -- 2.42.1 + +From b6161b96772073dbe8fe2ecc73da45c42e389c35 Mon Sep 17 00:00:00 2001 +From: Augustin Cavalier +Date: Fri, 21 Feb 2025 14:12:40 -0500 +Subject: libavutil: Forcibly enable use of pthread_setname_np. + +Defining _BSD_SOURCE in here may not work if pthread.h +was already included, so just redeclare the method and +set the definition. + +diff --git a/libavutil/thread.h b/libavutil/thread.h +index 2c00c7c..98f6edb 100644 +--- a/libavutil/thread.h ++++ b/libavutil/thread.h +@@ -37,6 +37,12 @@ + #if HAVE_PTHREADS + #include + ++#ifdef __HAIKU__ ++extern int pthread_setname_np(pthread_t thread, const char* name); ++#undef HAVE_PTHREAD_SETNAME_NP ++#define HAVE_PTHREAD_SETNAME_NP 1 ++#endif ++ + #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 + + #include +-- +2.45.2 + diff --git a/media-video/ffmpeg/patches/ffmpeg6-6.1.2.patchset b/media-video/ffmpeg/patches/ffmpeg6-6.1.2.patchset deleted file mode 100644 index 93be4f3ad..000000000 --- a/media-video/ffmpeg/patches/ffmpeg6-6.1.2.patchset +++ /dev/null @@ -1,29 +0,0 @@ -From b6161b96772073dbe8fe2ecc73da45c42e389c35 Mon Sep 17 00:00:00 2001 -From: Augustin Cavalier -Date: Fri, 21 Feb 2025 14:12:40 -0500 -Subject: libavutil: Forcibly enable use of pthread_setname_np. - -Defining _BSD_SOURCE in here may not work if pthread.h -was already included, so just redeclare the method and -set the definition. - -diff --git a/libavutil/thread.h b/libavutil/thread.h -index 2c00c7c..98f6edb 100644 ---- a/libavutil/thread.h -+++ b/libavutil/thread.h -@@ -37,6 +37,12 @@ - #if HAVE_PTHREADS - #include - -+#ifdef __HAIKU__ -+extern int pthread_setname_np(pthread_t thread, const char* name); -+#undef HAVE_PTHREAD_SETNAME_NP -+#define HAVE_PTHREAD_SETNAME_NP 1 -+#endif -+ - #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 - - #include --- -2.45.2 -