ffmpeg6: Commit the right patchset.

This commit is contained in:
Augustin Cavalier
2025-02-21 14:16:07 -05:00
parent 6121f3aa49
commit 6dfd5de5fc
2 changed files with 30 additions and 29 deletions

View File

@@ -47,3 +47,33 @@ index 4a291d1..57f1944 100755
--
2.42.1
From b6161b96772073dbe8fe2ecc73da45c42e389c35 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
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 <pthread.h>
+#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 <stdlib.h>
--
2.45.2

View File

@@ -1,29 +0,0 @@
From b6161b96772073dbe8fe2ecc73da45c42e389c35 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
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 <pthread.h>
+#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 <stdlib.h>
--
2.45.2