OSDN Git Service

Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
authorElliott Hughes <enh@google.com>
Mon, 4 Jan 2016 20:38:05 +0000 (20:38 +0000)
committerElliott Hughes <enh@google.com>
Mon, 4 Jan 2016 21:00:39 +0000 (13:00 -0800)
commit9cddb482b498abd134f7ccfc9933747e8bcb9cc7
treea11142895775f0aaa7c4c68175254e6ead803676
parent2fed6aa9f0d2a90d59ad3c4d73313958f3470152
Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""

This reverts commit 76814a8250fd5e1502909ef5e10e4d166cc96c0e.

This differs from the original in fixing the GCC -Werror build:

  bionic/libc/bionic/ifaddrs.cpp: In function 'void __handle_netlink_response(ifaddrs**, nlmsghdr*)':
  bionic/libc/bionic/ifaddrs.cpp:113:62: error: use of old-style cast [-Werror=old-style-cast]
       ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));

This appears to be a GCC bug; the GCC command-line correctly uses -isystem,
and manually adding #pragma GCC system_header doesn't help. So just turn the
warning off for GCC for now. We won't need to worry about building with GCC
soon anyway.

Bug: http://b/26238832
Change-Id: I01615bd335edf11baf487b1c83a9157cd780f4a1
15 files changed:
libc/Android.mk
libc/bionic/ifaddrs.cpp [new file with mode: 0644]
libc/include/ifaddrs.h [new file with mode: 0644]
libc/libc.arm.brillo.map
libc/libc.arm.map
libc/libc.arm64.map
libc/libc.map.txt
libc/libc.mips.brillo.map
libc/libc.mips.map
libc/libc.mips64.map
libc/libc.x86.brillo.map
libc/libc.x86.map
libc/libc.x86_64.map
tests/Android.mk
tests/ifaddrs_test.cpp [new file with mode: 0644]