Compilation with clang fails after recent commit (interfaces.c)
Hi all,
it looks like this recent commit broke compilation of libnice when using clang. We noticed this as we recently added Travis CI integration for Janus, and libnice is built manually rather than installed via repo: we have different targets using both gcc and clang, and while everything works fine with gcc, it fails with clang instead. You can find the whole trace here, but I'm adding the relevant part here:
interfaces.c:327:10: error: cast from 'struct sockaddr *' to
'struct sockaddr_in *' increases required alignment from 2 to 4
[-Werror,-Wcast-align]
sa = (struct sockaddr_in *) &ifr->ifr_addr;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Makefile:558: recipe for target 'interfaces.lo' failed
make[3]: *** [interfaces.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/travis/build/meetecho/janus-gateway/libnice/agent'
Makefile:471: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/travis/build/meetecho/janus-gateway/libnice/agent'
Makefile:491: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/travis/build/meetecho/janus-gateway/libnice'
Makefile:422: recipe for target 'all' failed
make: *** [all] Error 2