summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fd.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fd.hpp b/src/fd.hpp
index c736665..9a98f5b 100644
--- a/src/fd.hpp
+++ b/src/fd.hpp
@@ -60,7 +60,7 @@ namespace xs
enum {retired_fd = -1};
inline void *fdtoptr (fd_t fd_)
{
- return (void*) (fd_ + 1);
+ return (void*) (((char*) 0) + fd_ + 1);
}
inline fd_t ptrtofd (void *ptr_)
{