diff options
author | Sam James <sam@gentoo.org> | 2022-09-22 05:13:25 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-22 05:13:25 +0100 |
commit | bab72b72ddea0be05aa764df10093086e01cbc13 (patch) | |
tree | 5dc6053e9ef01f5365ba17153db91828674c7786 /dev-libs | |
parent | www-client/firefox: Stabilize 102.3.0 arm64, #872188 (diff) | |
download | gentoo-bab72b72ddea0be05aa764df10093086e01cbc13.tar.gz gentoo-bab72b72ddea0be05aa764df10093086e01cbc13.tar.bz2 gentoo-bab72b72ddea0be05aa764df10093086e01cbc13.zip |
dev-libs/glib: fix build w/ Clang
Closes: https://bugs.gentoo.org/871174
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/glib/files/glib-2.74.0-clang-build.patch | 26 | ||||
-rw-r--r-- | dev-libs/glib/glib-2.74.0.ebuild | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch b/dev-libs/glib/files/glib-2.74.0-clang-build.patch new file mode 100644 index 000000000000..23bb0630d028 --- /dev/null +++ b/dev-libs/glib/files/glib-2.74.0-clang-build.patch @@ -0,0 +1,26 @@ +https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e +https://bugs.gentoo.org/871174 + +From: Kjell Ahlstedt <kjellahlstedt@gmail.com> +Date: Thu, 15 Sep 2022 12:55:18 +0200 +Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for + clang + +The clang compiler requires the static_assert expression to be an integral +constant expression. `"text"` is not, but `sizeof "text"` is. + +Fixes #2740 +--- a/gio/gio-launch-desktop.c ++++ b/gio/gio-launch-desktop.c +@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier, + /* Arbitrary large size for the sending buffer, from systemd */ + int large_buffer_size = 8 * 1024 * 1024; + +- G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG"); +- G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG"); ++ G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG"); ++ G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG"); + + fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); + +GitLab diff --git a/dev-libs/glib/glib-2.74.0.ebuild b/dev-libs/glib/glib-2.74.0.ebuild index db17ff43554c..2afacc7da2a4 100644 --- a/dev-libs/glib/glib-2.74.0.ebuild +++ b/dev-libs/glib/glib-2.74.0.ebuild @@ -69,6 +69,7 @@ MULTILIB_CHOST_TOOLS=( PATCHES=( "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch + "${FILESDIR}"/${P}-clang-build.patch ) pkg_setup() { |