aboutsummaryrefslogtreecommitdiff
path: root/devel/glib20
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2022-11-26 14:01:23 +0000
committerJan Beich <jbeich@FreeBSD.org>2022-11-26 14:17:10 +0000
commit4b211242030e4160d54bd302770c253c5392d2ee (patch)
tree23f45872aefe91fb5148e918ae22102c2817e3f6 /devel/glib20
parent534a1aabfff0a61bb847b84126bcecdb4087f05f (diff)
downloadports-4b211242030e4160d54bd302770c253c5392d2ee.tar.gz
ports-4b211242030e4160d54bd302770c253c5392d2ee.zip
devel/glib20: unbreak some C++ consumers after 27fe5eff9577
$ make -C lang/gjs [...] ../util/log.cpp:106:25: error: no matching function for call to 'strcmp' if (debug_output && g_str_equal(debug_output, "stderr")) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/glib-2.0/glib/ghash.h:165:30: note: expanded from macro 'g_str_equal' #define g_str_equal(v1, v2) (strcmp ((gconstpointer) (v1), (gconstpointer) (v2)) == 0) ^~~~~~ /usr/include/string.h:82:6: note: candidate function not viable: cannot convert argument of incomplete type 'gconstpointer' (aka 'const void *') to 'const char *' for 1st argument int strcmp(const char *, const char *) __pure; ^ Reported by: fluffy, cmt Regressed by: https://gitlab.gnome.org/GNOME/glib/-/commit/b46ed37c972f
Diffstat (limited to 'devel/glib20')
-rw-r--r--devel/glib20/Makefile1
-rw-r--r--devel/glib20/files/patch-glib_ghash.h13
2 files changed, 14 insertions, 0 deletions
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile
index 7b19ba79cc27..d1f16fd6905d 100644
--- a/devel/glib20/Makefile
+++ b/devel/glib20/Makefile
@@ -1,5 +1,6 @@
PORTNAME= glib
DISTVERSION= 2.74.2
+PORTREVISION= 1
PORTEPOCH= 2
CATEGORIES= devel
MASTER_SITES= GNOME
diff --git a/devel/glib20/files/patch-glib_ghash.h b/devel/glib20/files/patch-glib_ghash.h
new file mode 100644
index 000000000000..df795aae653e
--- /dev/null
+++ b/devel/glib20/files/patch-glib_ghash.h
@@ -0,0 +1,13 @@
+https://gitlab.gnome.org/GNOME/glib/-/issues/2820
+
+--- glib/ghash.h.orig 2022-11-24 12:29:05 UTC
++++ glib/ghash.h
+@@ -162,7 +162,7 @@ gboolean g_str_equal (gconstpointer v1,
+ gconstpointer v2);
+
+ /* Macro for optimization in the case it is not used as callback function */
+-#define g_str_equal(v1, v2) (strcmp ((gconstpointer) (v1), (gconstpointer) (v2)) == 0)
++#define g_str_equal(v1, v2) (strcmp ((const char *) (v1), (const char *) (v2)) == 0)
+
+ GLIB_AVAILABLE_IN_ALL
+ guint g_str_hash (gconstpointer v);