1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00
freebsd-ports/biology/mmseqs2/files/patch-src_commons_DBReader.cpp
Jason W. Bacon b8bf1cfd41 biology/mmseqs2: Enable at least SSE2 by default
Hangs when built with clang and minimal optimizations, so build with
GCC temporarily.  Upstream is investigating.
2021-06-26 11:29:25 -05:00

12 lines
586 B
C++

--- src/commons/DBReader.cpp.orig 2021-06-25 22:40:36 UTC
+++ src/commons/DBReader.cpp
@@ -1004,7 +1004,7 @@ void DBReader<T>::setSequentialAdvice() {
#ifdef HAVE_POSIX_MADVISE
for(size_t i = 0; i < dataFileCnt; i++){
size_t dataSize = dataSizeOffset[i+1] - dataSizeOffset[i];
- if (posix_madvise (dataFiles[i], dataSize, POSIX_MADV_SEQUENTIAL) != 0){
+ if (dataSize > 0 && posix_madvise (dataFiles[i], dataSize, POSIX_MADV_SEQUENTIAL) != 0){
Debug(Debug::ERROR) << "posix_madvise returned an error " << dataFileName << "\n";
}
}