Merge "base: disallow close() on unique_fd." am: ca82aa7d1e am: 8c23285a85

am: 3c91e09042

Change-Id: I267b3ec4f89c2db3f6b077885df5af9366b9be03
This commit is contained in:
Josh Gao 2016-08-31 20:59:48 +00:00 committed by android-build-merger
commit 1e56889e51

View file

@ -95,4 +95,14 @@ using unique_fd = unique_fd_impl<DefaultCloser>;
} // namespace base
} // namespace android
template <typename T>
int close(const android::base::unique_fd_impl<T>&)
#if defined(__clang__)
__attribute__((__unavailable__(
#else
__attribute__((__error__(
#endif
"close called on unique_fd"
)));
#endif // ANDROID_BASE_UNIQUE_FD_H