Skip to content

Commit

Permalink
Fix wrong ifdef in lapi/fs.h
Browse files Browse the repository at this point in the history
This fixes compilation in the cases where struct file_clone_range is
defined in system headers. The problem was that the
HAVE_FILE_CLONE_RANGE should have been HAVE_STRUCT_FILE_CLONE_RANGE.

Fixes: 3acc96d ("Add fallback definitions for lapi/fs.h")
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
  • Loading branch information
metan-ucw committed Jul 24, 2024
1 parent c169c62 commit 3a33db5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/lapi/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
#define LAPI_FS_H__

#include "config.h"
#ifndef HAVE_MOUNT_SETATTR
# ifdef HAVE_LINUX_FS_H
# include <linux/fs.h>
# endif
#ifdef HAVE_LINUX_FS_H
# include <linux/fs.h>
#endif

#include <sys/user.h>
#include <limits.h>
#include <stdint.h>
#include "lapi/abisize.h"

#ifndef HAVE_FILE_CLONE_RANGE
#ifndef HAVE_STRUCT_FILE_CLONE_RANGE
struct file_clone_range {
int64_t src_fd;
uint64_t src_offset;
Expand Down

0 comments on commit 3a33db5

Please sign in to comment.