Skip to content

Commit

Permalink
edit 78 issue with std cmath ceil in Ubuntu > 17
Browse files Browse the repository at this point in the history
  • Loading branch information
4t4nner committed Oct 19, 2018
1 parent 6e7f18f commit 853a8f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/file_cache_row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <cmath>

#include <megaclient.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -69,7 +70,7 @@ int CacheManager::numChunks(size_t pos)
end +=i*ChunkedHash::SEGSIZE;
if(end >= pos) return i;
}
return 8 + ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE));
return 8 + std::ceil(float(pos-end)/(8.0*ChunkedHash::SEGSIZE));


}
Expand Down

0 comments on commit 853a8f5

Please sign in to comment.