[Android] HaoZeke:
Hey, I'm getting this while trying to compile android 7.1.1

Actually I'm trying to compile CarbonROM.

I can't figure out how or where this error might be coming from..

bionic/libc/bionic/bionic_netlink.cpp:85:12: error: use of old-style cast [-Werror,-Wold-style-cast]
for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hardware/qcom/msm8994/kernel-headers/linux/netlink.h:95:37: note: expanded from macro 'NLMSG_OK'
#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh
)->nlmsg_len <= (len))
^ ~~~~~~~~~~~~~~~~~~~~~~~
bionic/libc/bionic/bionic_netlink.cpp:85:66: error: use of old-style cast [-Werror,-Wold-style-cast]
for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
hardware/qcom/msm8994/kernel-headers/linux/netlink.h:94:92: note: expanded from macro 'NLMSG_NEXT'
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh
)->nlmsg_len)))
^ ~~~~~
bionic/libc/bionic/bionic_netlink.cpp:85:66: error: use of old-style cast [-Werror,-Wold-style-cast]
for (; NLMSG_OK(hdr, static_cast<size_t>(bytes_read)); hdr = NLMSG_NEXT(hdr, bytes_read)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
hardware/qcom/msm8994/kernel-headers/linux/netlink.h:94:72: note: expanded from macro 'NLMSG_NEXT'

It's a non trivial error, because compiling it with errors suppressed causes netmgrd to fail like so

12-14 11:29:27.409 3590 3590 F libc : CANNOT LINK EXECUTABLE "/system/vendor/bin/netmgrd": library "librmnetctl.so" no
t found
12-14 11:29:27.409 3590 3590 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 3590 (netmgrd)
12-14 11:29:27.410 460 460 W : debuggerd: handling request: pid=3590 uid=0 gid=0 tid=3590
12-14 11:29:27.469 3592 3592 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-14 11:29:27.470 3592 3592 F DEBUG : Build fingerprint: 'Sony/carbon_sumire_dsds/sumire:7.1.1/NMF26O/22d7a7dfe1:userd
ebug/test-keys'
12-14 11:29:27.470 3592 3592 F DEBUG : Revision: '0'
12-14 11:29:27.470 3592 3592 F DEBUG : ABI: 'arm64'
12-14 11:29:27.471 3592 3592 F DEBUG : pid: 3590, tid: 3590, name: netmgrd >>> /system/vendor/bin/netmgrd <<<
12-14 11:29:27.471 3592 3592 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
12-14 11:29:27.471 3592 3592 F DEBUG : x0 0000000000000000 x1 0000000000000e06 x2 0000000000000006 x3 00
00000000000008
12-14 11:29:27.472 3592 3592 F DEBUG : x4 0000000000000038 x5 0000000000000050 x6 ff636d746e651f73 x7 7f
7f7f7f7f7f7f7f
12-14 11:29:27.472 3592 3592 F DEBUG : x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 00
00000000000001
12-14 11:29:27.472 3592 3592 F DEBUG : x12 0000000000000018 x13 0000000000000000 x14 0000000000000000 x15 001863845149fb8f
12-14 11:29:27.474 3592 3592 F DEBUG : x16 0000000000000005 x17 072c222fbcea202c x18 00000000816f2c13 x19 00
0000772a4e6b40
12-14 11:29:27.475 3592 3592 F DEBUG : x20 0000000000000006 x21 000000772a4e6a98 x22 0000000000000002 x23 00
00000000000012
12-14 11:29:27.475 3592 3592 F DEBUG : x24 0000000000000000 x25 0000007fe06df730 x26 0000007fe06df7c0 x27 00
00007fe06e0870
12-14 11:29:27.475 3592 3592 F DEBUG : x28 000000772a4e2258 x29 0000007fe06df5a0 x30 000000772a4a810c
12-14 11:29:27.475 3592 3592 F DEBUG : sp 0000007fe06df580 pc 000000772a4a8c80 pstate 0000000060000000
12-14 11:29:27.482 3592 3592 F DEBUG :
12-14 11:29:27.482 3592 3592 F DEBUG : backtrace:
12-14 11:29:27.482 3592 3592 F DEBUG : #00 pc 0000000000075c80 /system/bin/linker64 (__dl_tgkill+8)
12-14 11:29:27.482 3592 3592 F DEBUG : #01 pc 0000000000075108 /system/bin/linker64 (__dl_pthread_kill+64)