You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/util.cpp
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,15 @@
3
3
// Distributed under the MIT/X11 software license, see the accompanying
4
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
6
+
#ifndef WIN32
7
+
// for posix_fallocate
8
+
#ifdef __linux__
9
+
#define_POSIX_C_SOURCE200112L
10
+
#endif
11
+
#include<fcntl.h>
12
+
#include<sys/stat.h>
13
+
#endif
14
+
6
15
#include"util.h"
7
16
#include"sync.h"
8
17
#include"version.h"
@@ -1155,6 +1164,35 @@ int GetFilesize(FILE* file)
1155
1164
// this function tries to make a particular range of a file allocated (corresponding to disk space)
1156
1165
// it is advisory, and the range specified in the arguments will never contain live data
0 commit comments