aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/io/FileOutputStream.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-03 22:18:38 +0100
committerMax Kellermann <max@duempel.org>2015-03-03 23:04:25 +0100
commitcd08e5c7da399ce1fb2f84eb39af7fd684c3df80 (patch)
tree1ef4622f3322b8c8058221098e3d9e0c188fab3c /src/fs/io/FileOutputStream.hxx
parentdd4beea44c6a574a25d1778e946f470683e1a0d6 (diff)
downloadmpd-cd08e5c7da399ce1fb2f84eb39af7fd684c3df80.tar.gz
mpd-cd08e5c7da399ce1fb2f84eb39af7fd684c3df80.tar.xz
mpd-cd08e5c7da399ce1fb2f84eb39af7fd684c3df80.zip
fs/io/FileOutputStream: use class FileDescriptor
Diffstat (limited to 'src/fs/io/FileOutputStream.hxx')
-rw-r--r--src/fs/io/FileOutputStream.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx
index f66554ec9..ff1ae31a4 100644
--- a/src/fs/io/FileOutputStream.hxx
+++ b/src/fs/io/FileOutputStream.hxx
@@ -25,6 +25,10 @@
#include "fs/AllocatedPath.hxx"
#include "Compiler.h"
+#ifndef WIN32
+#include "system/FileDescriptor.hxx"
+#endif
+
#include <assert.h>
#ifdef WIN32
@@ -39,7 +43,7 @@ class FileOutputStream final : public OutputStream {
#ifdef WIN32
HANDLE handle;
#else
- int fd;
+ FileDescriptor fd;
#endif
#ifdef HAVE_LINKAT
@@ -64,7 +68,7 @@ public:
#ifdef WIN32
return handle != INVALID_HANDLE_VALUE;
#else
- return fd >= 0;
+ return fd.IsDefined();
#endif
}