You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
329 B

--- a/linux.c
+++ b/linux.c
@@ -1,4 +1,6 @@
#define _XOPEN_SOURCE 600
+#include <unistd.h>
+#include <sys/types.h>
#include <stdint.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -19,7 +19,7 @@ static int epfd;
int
rawfalloc(int fd, int len)
{
- return posix_fallocate(fd, 0, len);
+ return ftruncate(fd, len);
}