GNOME Bugzilla – Bug 727119
wrong IN6_IS_ADDR_MC_LINKLOCAL usage break android build
Last modified: 2014-03-31 20:24:26 UTC
Created attachment 273034 [details] [review] networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work on struct in6_addr* IN6_IS_ADDR_MC_LINKLOCAL can only be used on a struct in6_addr*, but GLib now tries to use it on an array. It breaks on android. Attaching a patch where I just copied the glibc macro into there.
Btw, Android is correct here, this is how it is defined in RFC 2553
Comment on attachment 273034 [details] [review] networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work on struct in6_addr* ok to commit to master and glib-2-40, but can you add a comment explaining: /* IN6_IS_ADDR_MC_LINKLOCAL() is only defined to work on struct in6_addr *, * but @data may not be aligned correctly to be cast to that. */ or maybe just rename the macro to UNALIGNED_IN6_IS_ADDR_MC_LINKLOCAL? Actually, you can merge the two macros together too. No need for the separate MULTICAST one.
Created attachment 273268 [details] [review] networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work on struct in6_addr* Here is an updated patch, I also much simplified the macro by removing the unnecessary typecasting
Pushed to master commit 638993f5ac9be841c4fc932ca768d26840dd6be6 Author: Olivier Crête <olivier.crete@collabora.com> Date: Wed Mar 26 19:45:52 2014 -0400 networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work o https://bugzilla.gnome.org/show_bug.cgi?id=727119 and glib-2-40 commit c7a661988eb8fd18fb02565d83f52b0136fd3e85 Author: Olivier Crête <olivier.crete@collabora.com> Date: Wed Mar 26 19:45:52 2014 -0400 networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work o https://bugzilla.gnome.org/show_bug.cgi?id=727119