summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 969e287..298112d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -7,6 +7,7 @@
* (at your option) any later version.
*/
+#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <ev.h>
@@ -273,7 +274,7 @@ static int tip_client_head_hdr(struct tip_client *cli)
return -1;
}
- if (posix_fallocate(cli->fd, 0, cli->content_len) < 0) {
+ if (fallocate(cli->fd, 0, 0, cli->content_len) < 0) {
syslog(LOG_ERR, "failed to allocate room for file %s: %s",
filename, strerror(errno));
return -1;