Add the ScopedFd that we've never quite gotten around to.
This is actually for the new change I'm working on, but let's retrofit
it first to separate any bugs in these changes from those in the new
change...
Test: treehugger
Change-Id: I890aeb61f9792810a77ad0da3f9674c9cc5db7bb
diff --git a/libc/bionic/bionic_netlink.h b/libc/bionic/bionic_netlink.h
index a21200e..fc1bd0f 100644
--- a/libc/bionic/bionic_netlink.h
+++ b/libc/bionic/bionic_netlink.h
@@ -33,6 +33,8 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+#include "private/ScopedFd.h"
+
struct nlmsghdr;
class NetlinkConnection {
@@ -44,7 +46,7 @@
bool ReadResponses(void callback(void*, nlmsghdr*), void* context);
private:
- int fd_;
+ ScopedFd fd_;
char* data_;
size_t size_;
};