summaryrefslogtreecommitdiffstats
path: root/base/file_descriptor_posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_descriptor_posix.h')
-rw-r--r--base/file_descriptor_posix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/file_descriptor_posix.h b/base/file_descriptor_posix.h
index c730be6..376ad39 100644
--- a/base/file_descriptor_posix.h
+++ b/base/file_descriptor_posix.h
@@ -6,6 +6,7 @@
#define BASE_FILE_DESCRIPTOR_POSIX_H_
#include "base/files/file.h"
+#include "base/files/scoped_file.h"
namespace base {
@@ -24,6 +25,7 @@ struct FileDescriptor {
}
FileDescriptor(File file) : fd(file.TakePlatformFile()), auto_close(true) {}
+ explicit FileDescriptor(ScopedFD fd) : fd(fd.release()), auto_close(true) {}
bool operator==(const FileDescriptor& other) const {
return (fd == other.fd && auto_close == other.auto_close);