[PATCH] [Sanitizers] Fix internal_ftruncate() to work on FreeBSD

Phabricator reviews at reviews.llvm.org
Mon Mar 23 12:47:12 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8551

Files:
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
@@ -164,7 +164,8 @@
 
 uptr internal_ftruncate(fd_t fd, uptr size) {
   sptr res;
-  HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(ftruncate), fd, size));
+  HANDLE_EINTR(res, (sptr)internal_syscall(SYSCALL(ftruncate), fd,
+               (OFF_T)size));
   return res;
 }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8551.22507.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/26d763d0/attachment.bin>


More information about the llvm-commits mailing list