diff mbox series

[2/3] gstreamer1.0-plugins-base: Include required system headers for isspace() and sscanf()

Message ID 20220813170156.4040589-2-raj.khem@gmail.com
State Accepted, archived
Commit c03571af7ed8a35966bcf7fa5ae99f1301ff0026
Headers show
Series [1/3] rng-tools: Remove disabling DefaultDependencies | expand

Commit Message

Khem Raj Aug. 13, 2022, 5:01 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-system-headers-for-isspace-and-ssca.patch | 35 +++++++++++++++++++
 .../gstreamer1.0-plugins-base_1.20.3.bb       |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch
new file mode 100644
index 00000000000..23c1048a362
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-include-required-system-headers-for-isspace-and-ssca.patch
@@ -0,0 +1,35 @@ 
+From c85a53a41d4e6bfc49c377217ece12a1f330a690 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 12 Aug 2022 22:50:06 -0700
+Subject: [PATCH] include required system headers for isspace() and sscanf()
+ functions
+
+Newer compilers ( clang 15 ) has turned stricter and errors out instead
+of warning on implicit function declations
+Fixes
+gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+while (isspace(*t))
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2879]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gst/subparse/gstssaparse.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
+index ff802fa..5ebe678 100755
+--- a/gst/subparse/gstssaparse.c
++++ b/gst/subparse/gstssaparse.c
+@@ -24,6 +24,8 @@
+ #include "config.h"
+ #endif
+ 
++#include <ctype.h>              /* isspace() */
++#include <stdio.h>              /* sscanf() */
+ #include <stdlib.h>             /* atoi() */
+ #include <string.h>
+ 
+-- 
+2.37.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb
index 7eebbba9497..e5e346e5e96 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.bb
@@ -10,6 +10,7 @@  SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba
            file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
            file://0003-viv-fb-Make-sure-config.h-is-included.patch \
            file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
+           file://0001-include-required-system-headers-for-isspace-and-ssca.patch \
            "
 SRC_URI[sha256sum] = "7e30b3dd81a70380ff7554f998471d6996ff76bbe6fc5447096f851e24473c9f"