Commit 6d098278 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

pagemap: include falloc.h for FALLOC_FL_PUNCH_HOLE

Otherwise on some older environments like RHEL7 it will fail to build with:
  CC       pagemap.o
pagemap.c: In function ‘punch_hole’:
pagemap.c:54:40: error: ‘FALLOC_FL_PUNCH_HOLE’ undeclared (first use in this function)
    ret = fallocate(img_raw_fd(pr->pi), FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
pagemap.c:54:40: note: each undeclared identifier is reported only once for each function it appears in
pagemap.c:54:63: error: ‘FALLOC_FL_KEEP_SIZE’ undeclared (first use in this function)
    ret = fallocate(img_raw_fd(pr->pi), FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
make[2]: *** [pagemap.o] Error 1

CC: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1d0fcfa8
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <linux/falloc.h>
#include "image.h"
#include "cr_options.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment