Skip to content

Commit d9c0785

Browse files
committed
Fix assertion in PosixRandomAccessFile
Summary: See facebook/rocksdb#244 (comment) Also see this: https://github.com/facebook/rocksdb/blob/master/util/env_posix.cc#L1075 Test Plan: compiles Reviewers: yhchiang, ljin, sdong Reviewed By: ljin Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D22419
1 parent bda6f33 commit d9c0785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/env_posix.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class PosixRandomAccessFile: public RandomAccessFile {
231231
PosixRandomAccessFile(const std::string& fname, int fd,
232232
const EnvOptions& options)
233233
: filename_(fname), fd_(fd), use_os_buffer_(options.use_os_buffer) {
234-
assert(!options.use_mmap_reads);
234+
assert(!options.use_mmap_reads || sizeof(void*) < 8);
235235
}
236236
virtual ~PosixRandomAccessFile() { close(fd_); }
237237

0 commit comments

Comments
 (0)