Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""

This reverts commit 76814a8250.

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
This commit is contained in:
Elliott Hughes
2016-01-04 20:38:05 +00:00
parent 2fed6aa9f0
commit 9cddb482b4
15 changed files with 360 additions and 0 deletions

View File

@@ -1217,8 +1217,10 @@ LIBC_N {
__pwrite64_chk;
__write_chk;
fileno_unlocked;
freeifaddrs;
getgrgid_r;
getgrnam_r;
getifaddrs;
preadv;
preadv64;
prlimit; # arm mips x86