summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch42
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch42
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch39
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb7
4 files changed, 128 insertions, 2 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
new file mode 100644
index 0000000000..aee96aaa6e
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-Do-not-ignore-return-value-of-write.patch
@@ -0,0 +1,42 @@
1From d6501b107940e9f548c89236d773c6d33c15a5c9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 16 Apr 2016 13:28:59 -0700
4Subject: [PATCH 1/2] Do not ignore return value of write()
5
6gcc warns about ignoring return value when compiling
7with fortify turned on.
8
9assert when write() fails
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted
14
15 glib/tests/unix.c | 5 +++--
16 1 file changed, 3 insertions(+), 2 deletions(-)
17
18diff --git a/glib/tests/unix.c b/glib/tests/unix.c
19index 3543458..4e7ed85 100644
20--- a/glib/tests/unix.c
21+++ b/glib/tests/unix.c
22@@ -32,14 +32,15 @@ test_pipe (void)
23 GError *error = NULL;
24 int pipefd[2];
25 char buf[1024];
26- ssize_t bytes_read;
27+ ssize_t bytes_read, bytes_written;
28 gboolean res;
29
30 res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
31 g_assert (res);
32 g_assert_no_error (error);
33
34- write (pipefd[1], "hello", sizeof ("hello"));
35+ bytes_written = write (pipefd[1], "hello", sizeof ("hello"));
36+ g_assert (bytes_written != -1 && "write() failed");
37 memset (buf, 0, sizeof (buf));
38 bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
39 g_assert_cmpint (bytes_read, >, 0);
40--
412.8.0
42
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
new file mode 100644
index 0000000000..f61fa0ae6a
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0002-tests-Ignore-y2k-warnings.patch
@@ -0,0 +1,42 @@
1From b06b22fecc7deda8c65e28670562ca2371e4e725 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 16 Apr 2016 13:43:54 -0700
4Subject: [PATCH 2/2] tests: Ignore y2k warnings
5
6silences
7| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c: In function 'test_strftime':
8| ../../../../../../../../workspace/sources/glib-2.0/glib/tests/gdatetime.c:1338:3: error: '%c' yields only last 2 digits of year in some locales [-Werror=format-y2k]
9| "a%a A%A b%b B%B c%c C%C d%d e%e F%F g%g G%G h%h H%H I%I j%j m%m M%M "
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted
14
15 glib/tests/gdatetime.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
19index 16a163c..e6062fc 100644
20--- a/glib/tests/gdatetime.c
21+++ b/glib/tests/gdatetime.c
22@@ -1326,6 +1326,9 @@ test_z (void)
23 g_time_zone_unref (tz);
24 }
25
26+#pragma GCC diagnostic push
27+#pragma GCC diagnostic ignored "-Wformat-y2k"
28+
29 static void
30 test_strftime (void)
31 {
32@@ -1351,6 +1354,7 @@ test_strftime (void)
33 }
34 #endif
35 }
36+#pragma GCC diagnostic pop
37
38 static void
39 test_find_interval (void)
40--
412.8.0
42
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch b/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch
new file mode 100644
index 0000000000..d533975100
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/ignore-format-nonliteral-warning.patch
@@ -0,0 +1,39 @@
1From 8cdbc7fb2c8c876902e457abe46ee18a0b134486 Mon Sep 17 00:00:00 2001
2From: coypu <coypu@sdf.org>
3Date: Wed, 2 Mar 2016 19:38:48 +0200
4Subject: gdate: Move warning pragma outside of function
5
6Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
7older versions of GCC, which don't allow pragma inside functions.
8
9https://bugzilla.gnome.org/761550
10---
11Upstream-Status: Backport
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14 glib/gdate.c | 8 +++++---
15 1 file changed, 5 insertions(+), 3 deletions(-)
16
17diff --git a/glib/gdate.c b/glib/gdate.c
18index cdc735c..92c34d2 100644
19--- a/glib/gdate.c
20+++ b/glib/gdate.c
21@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
22 *
23 * Returns: number of characters written to the buffer, or 0 the buffer was too small
24 */
25+#pragma GCC diagnostic push
26+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
27+
28 gsize
29 g_date_strftime (gchar *s,
30 gsize slen,
31@@ -2552,3 +2552,5 @@ g_date_strftime (gchar *s,
32 return retval;
33 #endif
34 }
35+
36+#pragma GCC diagnostic pop
37--
38cgit v0.12
39
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
index 8e445b4154..9e9514962e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
@@ -13,11 +13,14 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
13 file://uclibc_musl_translation.patch \ 13 file://uclibc_musl_translation.patch \
14 file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \ 14 file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
15 file://allow-run-media-sdX-drive-mount-if-username-root.patch \ 15 file://allow-run-media-sdX-drive-mount-if-username-root.patch \
16 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \ 16 file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
17 file://Enable-more-tests-while-cross-compiling.patch \ 17 file://Enable-more-tests-while-cross-compiling.patch \
18 file://gi-exclude.patch \ 18 file://gi-exclude.patch \
19 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \ 19 file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
20 " 20 file://ignore-format-nonliteral-warning.patch \
21 file://0001-Do-not-ignore-return-value-of-write.patch \
22 file://0002-tests-Ignore-y2k-warnings.patch \
23 "
21 24
22SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \ 25SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
23 file://relocate-modules.patch" 26 file://relocate-modules.patch"