serenity/Ports/ffmpeg/patches/0002-Adapt-to-the-Serenity-thread-name-interface.patch
Tim Schumacher 00ed042eda Ports/ffmpeg: Update to version 6.0
This additionally includes a patch from the current master branch,
which fixes building with binutils 2.41 and newer.
2023-10-02 20:21:27 +02:00

32 lines
952 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Mon, 2 Oct 2023 01:17:46 +0200
Subject: [PATCH] Adapt to the Serenity thread name interface
---
libavutil/thread.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavutil/thread.h b/libavutil/thread.h
index 2f5e7e1cb552fd12f954334e80960cbfb6ac7108..264d6ae646dc78e0f21b58445a412487e055ebc5 100644
--- a/libavutil/thread.h
+++ b/libavutil/thread.h
@@ -26,6 +26,8 @@
#if HAVE_PRCTL
#include <sys/prctl.h>
+#include <unistd.h>
+#include <string.h>
#endif
#include "error.h"
@@ -195,7 +197,7 @@ static inline int ff_thread_once(char *control, void (*routine)(void))
static inline int ff_thread_setname(const char *name)
{
#if HAVE_PRCTL
- return AVERROR(prctl(PR_SET_NAME, name));
+ return AVERROR(prctl(PR_SET_THREAD_NAME, gettid(), name, strlen(name)));
#endif
return AVERROR(ENOSYS);