summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-18 07:50:03 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-18 07:50:03 +0000
commitf8730c9e91ed2ce341e231c5adffb5f003f77678 (patch)
treeb4ecbb2994744fab3e10498bf64ef81d01ca550d /media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch
parent3e02de9a64a4e3d1f1af271a9da7ff7bbf8d86c8 (diff)
gentoo auto-resync : 18:12:2023 - 07:50:03
Diffstat (limited to 'media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch')
-rw-r--r--media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch b/media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch
new file mode 100644
index 000000000000..a9d0bfa35abe
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-6.1-0006-hwcontext_vulkan-guard-unistd.h-include.patch
@@ -0,0 +1,33 @@
+From 884a660cae23769d92d533cc1b6232d3cdfbae43 Mon Sep 17 00:00:00 2001
+From: Benjamin Cheng <ben@bcheng.me>
+Date: Fri, 22 Sep 2023 12:49:22 -0400
+Subject: [PATCH 6/6] hwcontext_vulkan: guard unistd.h include
+
+win32 typically doesn't have unistd.h, so always including it will break
+MSVC builds. The usage of those POSIX functions are already guarded by
+_WIN32, so use that to guard unistd.h include as well.
+
+(cherry picked from commit 185871fdd39762295973c1f3db1459e04121317c)
+---
+ libavutil/hwcontext_vulkan.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
+index 506a218a42..d288fb7ac7 100644
+--- a/libavutil/hwcontext_vulkan.c
++++ b/libavutil/hwcontext_vulkan.c
+@@ -27,10 +27,10 @@
+ #include "compat/w32dlfcn.h"
+ #else
+ #include <dlfcn.h>
++#include <unistd.h>
+ #endif
+
+ #include "thread.h"
+-#include <unistd.h>
+
+ #include "config.h"
+ #include "pixdesc.h"
+--
+2.43.0
+