Loading base/include/android-base/unique_fd.h +11 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #pragma once #include <dirent.h> #include <fcntl.h> #if !defined(_WIN32) Loading Loading @@ -231,3 +232,13 @@ inline DIR* Fdopendir(unique_fd&& ufd) { template <typename T> int close(const android::base::unique_fd_impl<T>&) __attribute__((__unavailable__("close called on unique_fd"))); template <typename T> FILE* fdopen(const android::base::unique_fd_impl<T>&, const char* mode) __attribute__((__unavailable__("fdopen takes ownership of the fd passed in; either dup the " "unique_fd, or use android::base::Fdopen to pass ownership"))); template <typename T> DIR* fdopendir(const android::base::unique_fd_impl<T>&) __attribute__(( __unavailable__("fdopendir takes ownership of the fd passed in; either dup the " "unique_fd, or use android::base::Fdopendir to pass ownership"))); Loading
base/include/android-base/unique_fd.h +11 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #pragma once #include <dirent.h> #include <fcntl.h> #if !defined(_WIN32) Loading Loading @@ -231,3 +232,13 @@ inline DIR* Fdopendir(unique_fd&& ufd) { template <typename T> int close(const android::base::unique_fd_impl<T>&) __attribute__((__unavailable__("close called on unique_fd"))); template <typename T> FILE* fdopen(const android::base::unique_fd_impl<T>&, const char* mode) __attribute__((__unavailable__("fdopen takes ownership of the fd passed in; either dup the " "unique_fd, or use android::base::Fdopen to pass ownership"))); template <typename T> DIR* fdopendir(const android::base::unique_fd_impl<T>&) __attribute__(( __unavailable__("fdopendir takes ownership of the fd passed in; either dup the " "unique_fd, or use android::base::Fdopendir to pass ownership")));