From 5da5c4d9fa8b85d8cd63201869abb8be25c72f3a Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 19:21:34 +0430 Subject: Ports: Update ffmpeg's patches to use git patches --- .../patches/0001-Assume-that-EDOM-exists.patch | 27 ++++++++++++++++++++++ Ports/ffmpeg/patches/ReadMe.md | 12 +++++----- .../patches/errno-is-not-valid-during-cpp.patch | 13 ----------- 3 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 Ports/ffmpeg/patches/0001-Assume-that-EDOM-exists.patch delete mode 100644 Ports/ffmpeg/patches/errno-is-not-valid-during-cpp.patch (limited to 'Ports/ffmpeg') diff --git a/Ports/ffmpeg/patches/0001-Assume-that-EDOM-exists.patch b/Ports/ffmpeg/patches/0001-Assume-that-EDOM-exists.patch new file mode 100644 index 0000000000..f0ccaea6b6 --- /dev/null +++ b/Ports/ffmpeg/patches/0001-Assume-that-EDOM-exists.patch @@ -0,0 +1,27 @@ +From d64d7a469a8524d2ea8121d10844ff73feef3b55 Mon Sep 17 00:00:00 2001 +From: Peter Ross +Date: Tue, 1 Mar 2022 19:50:19 +1100 +Subject: [PATCH] Assume that EDOM exists + +Since errno values are not numeric constants on serenity, this won't +work in cpp, assume that it exists. +--- + libavutil/error.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavutil/error.h b/libavutil/error.h +index 0d3269a..a54d80d 100644 +--- a/libavutil/error.h ++++ b/libavutil/error.h +@@ -37,7 +37,7 @@ + + + /* error handling */ +-#if EDOM > 0 ++#if 1 + #define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions. + #define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value. + #else +-- +2.36.1 + diff --git a/Ports/ffmpeg/patches/ReadMe.md b/Ports/ffmpeg/patches/ReadMe.md index 986ba7920a..235a7251f2 100644 --- a/Ports/ffmpeg/patches/ReadMe.md +++ b/Ports/ffmpeg/patches/ReadMe.md @@ -1,9 +1,9 @@ -# Patches for FFmpeg on SerenityOS +# Patches for ffmpeg on SerenityOS -## `errno-is-not-valid-during-cpp.patch` +## `0001-Assume-that-EDOM-exists.patch` -FFmpeg performs a preprocessor-time test on errno values. This test does -not work on SerenityOS because our errno values are described by an -enum, and therefore are only available at compile time. +Assume that EDOM exists + +Since errno values are not numeric constants on serenity, this won't +work in cpp, assume that it exists. -The patch removes the preprocessor-time test. diff --git a/Ports/ffmpeg/patches/errno-is-not-valid-during-cpp.patch b/Ports/ffmpeg/patches/errno-is-not-valid-during-cpp.patch deleted file mode 100644 index b66b2735b1..0000000000 --- a/Ports/ffmpeg/patches/errno-is-not-valid-during-cpp.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/libavutil/error.h b/libavutil/error.h -index 0d3269a..a54d80d 100644 ---- a/libavutil/error.h -+++ b/libavutil/error.h -@@ -37,7 +37,7 @@ - - - /* error handling */ --#if EDOM > 0 -+#if 1 - #define AVERROR(e) (-(e)) ///< Returns a negative error code from a POSIX error code, to return from library functions. - #define AVUNERROR(e) (-(e)) ///< Returns a POSIX error code from a library function error return value. - #else -- cgit v1.2.3