diff options
author | Tim-Philipp Muller <tim@centricular.com> | 2022-12-26 00:39:17 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2023-01-12 21:57:08 +0000 |
commit | 8c02c7bfd2d6797a614d30ae6daff3f2b89bb6ac (patch) | |
tree | 2f9052c1e332437e25357cd86fe9efec6605706d | |
parent | ac953430d31669f473e5c96b408c27fd4a2a7e4d (diff) |
glib: fix compiler warnings/errors for gsocket.c on armv7
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/864>
-rw-r--r-- | recipes/glib.recipe | 2 | ||||
-rw-r--r-- | recipes/glib/0001-gio-gsocket-fix-compiler-warnings-on-armv7-Android.patch | 64 |
2 files changed, 66 insertions, 0 deletions
diff --git a/recipes/glib.recipe b/recipes/glib.recipe index ac9e473f..0b02a56e 100644 --- a/recipes/glib.recipe +++ b/recipes/glib.recipe @@ -38,6 +38,8 @@ class Recipe(recipe.Recipe): 'glib/0008-Unhide-_g_io_modules_ensure_extension_points_registe.patch', # TODO upstreaming 'glib/0001-meson-Fix-detection-of-a-system-provided-proxy-libin.patch', + # TODO upstreaming + 'glib/0001-gio-gsocket-fix-compiler-warnings-on-armv7-Android.patch', ] files_libs = [ diff --git a/recipes/glib/0001-gio-gsocket-fix-compiler-warnings-on-armv7-Android.patch b/recipes/glib/0001-gio-gsocket-fix-compiler-warnings-on-armv7-Android.patch new file mode 100644 index 00000000..35a40c70 --- /dev/null +++ b/recipes/glib/0001-gio-gsocket-fix-compiler-warnings-on-armv7-Android.patch @@ -0,0 +1,64 @@ +From 1352bf59879e6f39a508631342a3fee8dc360aa9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Mon, 26 Dec 2022 00:36:08 +0000 +Subject: [PATCH] gio: gsocket: fix compiler warnings on armv7 Android + +gsocket.c:497:37: error: passing 'guint *' (aka 'unsigned int *') + to parameter of type 'socklen_t *' (aka 'int *') converts between + pointers to integer types with different sign [-Werror,-Wpointer-sign] +--- + gio/gsocket.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gio/gsocket.c b/gio/gsocket.c +index bd5549f..e00ba2c 100644 +--- a/gio/gsocket.c ++++ b/gio/gsocket.c +@@ -461,7 +461,7 @@ g_socket_details_from_fd (GSocket *socket) + struct sockaddr sa; + } address; + gint fd; +- guint addrlen; ++ socklen_t addrlen; + int value, family; + int errsv; + +@@ -503,7 +503,7 @@ g_socket_details_from_fd (GSocket *socket) + if (addrlen > 0) + { + g_assert (G_STRUCT_OFFSET (struct sockaddr, sa_family) + +- sizeof address.storage.ss_family <= addrlen); ++ sizeof address.storage.ss_family <= (gsize) addrlen); + family = address.storage.ss_family; + } + else +@@ -1990,7 +1990,7 @@ g_socket_get_local_address (GSocket *socket, + struct sockaddr_storage storage; + struct sockaddr sa; + } buffer; +- guint len = sizeof (buffer); ++ socklen_t len = sizeof (buffer); + + g_return_val_if_fail (G_IS_SOCKET (socket), NULL); + +@@ -2026,7 +2026,7 @@ g_socket_get_remote_address (GSocket *socket, + struct sockaddr_storage storage; + struct sockaddr sa; + } buffer; +- guint len = sizeof (buffer); ++ socklen_t len = sizeof (buffer); + + g_return_val_if_fail (G_IS_SOCKET (socket), NULL); + +@@ -6220,7 +6220,7 @@ g_socket_get_option (GSocket *socket, + gint *value, + GError **error) + { +- guint size; ++ socklen_t size; + + g_return_val_if_fail (G_IS_SOCKET (socket), FALSE); + +-- +2.30.2 + |