From 03838610f29c782728ecc9f970f40450359e13bc3eb011616f48f1615f5b5b5e Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 6 Aug 2021 07:14:11 +0000 Subject: [PATCH] Accepting request 910172 from home:dimstar:Factory - Add 63e7864.patch: Fix build with glibc 2.34: use 3 parameters for close_range (boo#1189088). OBS-URL: https://build.opensuse.org/request/show/910172 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib2?expand=0&rev=461 --- 63e7864.patch | 29 +++++++++++++++++++++++++++++ glib2.changes | 6 ++++++ glib2.spec | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 63e7864.patch diff --git a/63e7864.patch b/63e7864.patch new file mode 100644 index 0000000..211a8ac --- /dev/null +++ b/63e7864.patch @@ -0,0 +1,29 @@ +From 6e59d21b273f026e82adc56fecbec67d1ffa72a4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 8 Jul 2021 17:26:43 -0700 +Subject: [PATCH] correctly use 3 parameters for close_range + +libc implementation has 3 parameter e.g. +https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2&format=html + +Signed-off-by: Khem Raj +--- + glib/gspawn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glib/gspawn.c b/glib/gspawn.c +index 95f5b868e..a15fb1ca1 100644 +--- a/glib/gspawn.c ++++ b/glib/gspawn.c +@@ -1494,7 +1494,7 @@ safe_closefrom (int lowfd) + * + * Handle ENOSYS in case it’s supported in libc but not the kernel; if so, + * fall back to safe_fdwalk(). */ +- if (close_range (lowfd, G_MAXUINT) != 0 && errno == ENOSYS) ++ if (close_range (lowfd, G_MAXUINT, 0) != 0 && errno == ENOSYS) + #endif /* HAVE_CLOSE_RANGE */ + (void) safe_fdwalk (close_func, GINT_TO_POINTER (lowfd)); + #endif +-- +GitLab + diff --git a/glib2.changes b/glib2.changes index b9e3e2f..d1ce5b5 100644 --- a/glib2.changes +++ b/glib2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 4 15:17:41 UTC 2021 - Dominique Leuenberger + +- Add 63e7864.patch: Fix build with glibc 2.34: use 3 parameters + for close_range (boo#1189088). + ------------------------------------------------------------------- Fri Jul 30 08:33:40 UTC 2021 - Yifan Jiang diff --git a/glib2.spec b/glib2.spec index 24f35c2..e55500c 100644 --- a/glib2.spec +++ b/glib2.spec @@ -47,6 +47,8 @@ Patch2: glib2-suppress-schema-deprecated-path-warning.patch Patch3: glib2-dbus-socket-path.patch # PATCH-FIX-OPENSUSE glib2-gdbus-codegen-version.patch olaf@aepfle.de -- Remove version string from files generated by gdbus-codegen Patch4: glib2-gdbus-codegen-version.patch +# PATCH-FIX-UPSTREAM 63e7864.patch boo#1189088 dimstar@opensuse.org -- Fix build with glibc 2.34: use 3 parameters for close_range +Patch5: https://gitlab.gnome.org/GNOME/glib/-/commit/63e7864.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: fdupes BuildRequires: gamin-devel @@ -269,6 +271,7 @@ translation-update-upstream %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 cp -a %{SOURCE1} %{SOURCE2} %{SOURCE5} . cp -a %{SOURCE4} gnome_defaults.conf # replace /usr/bin/env shebangs