[PATCH] [Sanitizers] Fix internal_ftruncate() to work on FreeBSD
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Mar 23 09:00:19 PDT 2015
Hi kcc, samsonov, emaste,
##off_t## is 64 bits wide on FreeBSD regardless of the target width.
http://reviews.llvm.org/D8551
Files:
lib/sanitizer_common/sanitizer_linux.cc
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ 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.22476.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150323/3274579b/attachment.bin>
More information about the llvm-commits
mailing list