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

  1. --- a/linux.c
  2. +++ b/linux.c
  3. @@ -1,4 +1,6 @@
  4. #define _XOPEN_SOURCE 600
  5. +#include <unistd.h>
  6. +#include <sys/types.h>
  7. #include <stdint.h>
  8. #include <fcntl.h>
  9. #include <stdlib.h>
  10. @@ -19,7 +21,7 @@ static int epfd;
  11. int
  12. rawfalloc(int fd, int len)
  13. {
  14. - return posix_fallocate(fd, 0, len);
  15. + return ftruncate(fd, len);
  16. }