Issue during compiling libnice 0.1.15 for Arm
Hello, I'm trying to compile libnice 0.1.15 on RaspberryPi and it fails on cast increases required alignment of target type
CC udp-turn.lo
In file included from /usr/include/arm-linux-gnueabihf/bits/byteswap.h:34:0,
from /usr/include/endian.h:60,
from /usr/include/arm-linux-gnueabihf/sys/types.h:216,
from /usr/include/arm-linux-gnueabihf/bits/uio.h:25,
from /usr/include/arm-linux-gnueabihf/bits/fcntl-linux.h:38,
from /usr/include/arm-linux-gnueabihf/bits/fcntl.h:54,
from /usr/include/fcntl.h:35,
from udp-turn.c:46:
udp-turn.c: In function ‘socket_recv_messages’:
udp-turn.c:365:33: error: cast increases required alignment of target type [-Werror=cast-align]
guint16 msg_len = ntohs (*(guint16 *)f_buffer) + sizeof (guint16);
^
udp-turn.c:455:27: error: cast increases required alignment of target type [-Werror=cast-align]
msg_len = ntohs (*(guint16 *)buffer) + sizeof (guint16);
^
udp-turn.c: At top level:
cc1: error: unrecognized command line option "-Wno-cast-function-type" [-Werror]
cc1: all warnings being treated as errors
Makefile:464: recipe for target 'udp-turn.lo' failed
make[2]: *** [udp-turn.lo] Error 1
make[2]: Leaving directory '/tmp/libnice/socket'
Makefile:483: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/libnice'
Makefile:413: recipe for target 'all' failed
make: *** [all] Error 2
Steps to compile
git clone https://gitlab.freedesktop.org/libnice/libnice /tmp/libnice \
&& cd /tmp/libnice \
&& git checkout 0.1.15 \
&& ./autogen.sh --prefix=/usr --disable-gtk-doc \
&& make && make install