You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/02/10 23:36:28 UTC
svn commit: r1242964 -
/incubator/mesos/trunk/third_party/libprocess/src/config.hpp
Author: benh
Date: Fri Feb 10 22:36:28 2012
New Revision: 1242964
URL: http://svn.apache.org/viewvc?rev=1242964&view=rev
Log:
Fixed bug with Linux specific sendfile wrapper.
Modified:
incubator/mesos/trunk/third_party/libprocess/src/config.hpp
Modified: incubator/mesos/trunk/third_party/libprocess/src/config.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/src/config.hpp?rev=1242964&r1=1242963&r2=1242964&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/src/config.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/src/config.hpp Fri Feb 10 22:36:28 2012
@@ -27,7 +27,7 @@
#ifndef MAP_32BIT
#define MAP_32BIT 0
#endif
-#define sendfile(s, fd, offset, size) \
+#define sendfile(s, fd, offset, size) \
({ off_t length = size; \
sendfile(fd, s, offset, &length, NULL, 0) == 0 ? length : -1; })
#endif /* __APPLE__ */
@@ -39,7 +39,7 @@
#include <sys/sendfile.h>
#define sendfile(s, fd, offset, size) \
({ off_t _offset = offset; \
- sendfile(s, fd, &_offset, size) == -1 ? -1 : length : offset - _offset; })
+ sendfile(s, fd, &_offset, size) == -1 ? -1 : offset - _offset; })
#endif /* __linux__ */
#endif /* CONFIG_HPP */