[compiler-rt] r233003 - [Sanitizers] Fix internal_ftruncate() to work on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Mon Mar 23 12:44:35 PDT 2015


Author: vkutuzov
Date: Mon Mar 23 14:44:35 2015
New Revision: 233003

URL: http://llvm.org/viewvc/llvm-project?rev=233003&view=rev
Log:
[Sanitizers] Fix internal_ftruncate() to work on FreeBSD
Differential Revision: http://reviews.llvm.org/D8551

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

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=233003&r1=233002&r2=233003&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Mon Mar 23 14:44:35 2015
@@ -164,7 +164,8 @@ uptr internal_write(fd_t fd, const void
 
 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;
 }
 





More information about the llvm-commits mailing list