From 208fe39375bf7ab3d7ab1b8fcb7f603855f57def Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 16 Feb 2012 10:53:58 +0900 Subject: Fix FD/handle conversion bug On systems where int size != pointer size the coversion resulted in compile-time error. Signed-off-by: Martin Sustrik --- src/fd.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fd.hpp') 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_) { -- cgit v1.2.3