Merge "Don\'t include android-base/macros.h from android-base/unique_fd.h" am: 090003a am: df38f5e
am: 9428814
* commit '9428814b8e57e0562235776927c0d3ed99f73f2c':
Don't include android-base/macros.h from android-base/unique_fd.h
Change-Id: I54c1a14226dab156e9aa40b83f6186b36fc3e459
diff --git a/base/include/android-base/unique_fd.h b/base/include/android-base/unique_fd.h
index 8bc49ce..ab41c55 100644
--- a/base/include/android-base/unique_fd.h
+++ b/base/include/android-base/unique_fd.h
@@ -19,7 +19,10 @@
#include <unistd.h>
-#include <android-base/macros.h>
+// DO NOT INCLUDE OTHER LIBBASE HEADERS!
+// This file gets used in libbinder, and libbinder is used everywhere.
+// Including other headers from libbase frequently results in inclusion of
+// android-base/macros.h, which causes macro collisions.
// Container for a file descriptor that automatically closes the descriptor as
// it goes out of scope.
@@ -75,7 +78,8 @@
private:
int value_;
- DISALLOW_COPY_AND_ASSIGN(unique_fd);
+ unique_fd(const unique_fd&);
+ void operator=(const unique_fd&);
};
} // namespace base