From c08c26f3fef4d9767c0b732995f911cfe32f8e50 Mon Sep 17 00:00:00 2001 From: Lanius-collaris <55432068+Lanius-collaris@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:06:06 +0800 Subject: [PATCH] fix getif_workaround_android.h char may be signed --- src/compat/getif_workaround_android.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compat/getif_workaround_android.h b/src/compat/getif_workaround_android.h index 45e774805..146654a03 100644 --- a/src/compat/getif_workaround_android.h +++ b/src/compat/getif_workaround_android.h @@ -22,7 +22,7 @@ get_interface(){ if (if1->ifa_addr->sa_family != AF_INET) continue; if((if1->ifa_flags & IFF_MULTICAST) == IFF_MULTICAST){ - char* sa_data = if1->ifa_addr->sa_data; + auto sa_data = reinterpret_cast(if1->ifa_addr->sa_data); uint32_t value = sa_data[2] << 24 | sa_data[3] << 16 | sa_data[4] << 8 @@ -36,4 +36,4 @@ get_interface(){ } } /* namespace workaround */ -} /* namespace dht */ \ No newline at end of file +} /* namespace dht */