[gssdp] net-posix: Disable deprecation warning
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] net-posix: Disable deprecation warning
- Date: Sun, 20 Jun 2021 14:10:47 +0000 (UTC)
commit 41981fff1ac4e068acd679f4ef0551807db07f6d
Author: Jens Georg <mail jensge org>
Date: Sun Jun 20 16:10:00 2021 +0200
net-posix: Disable deprecation warning
Used to fix deprecation warning for g_memdup2
libgssdp/gssdp-net-posix.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/libgssdp/gssdp-net-posix.c b/libgssdp/gssdp-net-posix.c
index e98fd20..2525c67 100644
--- a/libgssdp/gssdp-net-posix.c
+++ b/libgssdp/gssdp-net-posix.c
@@ -202,7 +202,10 @@ gssdp_net_mac_lookup (GSSDPNetworkDevice *device, const char *ip_address)
g_clear_pointer (&data, g_free);
data_length = RTA_PAYLOAD (rtattr);
#if GLIB_CHECK_VERSION(2, 68, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
data = g_memdup2 (RTA_DATA (rtattr), data_length);
+#pragma GCC diagnostic pop
#else
data = g_memdup (RTA_DATA (rtattr), data_length);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]