packages/net/beanstalkd/patches/902-replace-posix_fallocate.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

18 lines
329 B
Diff

--- 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 +21,7 @@ static int epfd;
int
rawfalloc(int fd, int len)
{
- return posix_fallocate(fd, 0, len);
+ return ftruncate(fd, len);
}