From 52cafe83c3519890bd0e69c78f7cebe43de21d68 Mon Sep 17 00:00:00 2001 From: liuyumeng Date: Tue, 10 Aug 2021 16:51:53 +0800 Subject: [PATCH] fix the third parameter of clise-range --- ...tly-use-3-parameters-for-clise-range.patch | 28 +++++++++++++++++++ glib2.spec | 10 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 backport-correctly-use-3-parameters-for-clise-range.patch diff --git a/backport-correctly-use-3-parameters-for-clise-range.patch b/backport-correctly-use-3-parameters-for-clise-range.patch new file mode 100644 index 0000000..d9f366c --- /dev/null +++ b/backport-correctly-use-3-parameters-for-clise-range.patch @@ -0,0 +1,28 @@ +From b71117d89434db83d34bc1b981ca03d4be299576 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 899647c2f..3073a10a4 100644 +--- a/glib/gspawn.c ++++ b/glib/gspawn.c +@@ -1520,7 +1520,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.spec b/glib2.spec index 43db852..fa4cf77 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,11 +1,13 @@ Name: glib2 Version: 2.68.1 -Release: 1 +Release: 2 Summary: The core library that forms the basis for projects such as GTK+ and GNOME License: LGPLv2+ URL: http://www.gtk.org Source0: http://download.gnome.org/sources/glib/2.68/glib-%{version}.tar.xz +Patch6000: backport-correctly-use-3-parameters-for-clise-range.patch + BuildRequires: chrpath gcc gcc-c++ gettext gtk-doc perl-interpreter BUildRequires: glibc-devel libattr-devel libselinux-devel meson BuildRequires: systemtap-sdt-devel pkgconfig(libelf) pkgconfig(libffi) @@ -140,6 +142,12 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %doc %{_datadir}/gtk-doc/html/* %changelog +* Tue Aug 10 2021 liuyumeng - 2.68.1-2 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:fix the third parameter of clise-range + * Wed Jun 30 2021 weijin deng - 2.68.1-1 - Upgrade to 2.68.1 because gnome-builder and more new gnome applications need function g_memdup2 which needs glib2 ≥2.67.3 to instead of g_memdup -- Gitee