mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-27 15:30:44 +00:00
btrfs-progs: fix kerncompat.h include ordering for libbtrfs
We're keeping a libbtrfs compatible kerncompat.h around to make it easier to modify the rest of btrfs-progs. Unfortunately we also use some of kernel-lib in libbtrfs, and those also include kerncompat.h. Those getting included first means we'll pull include/kerncompat.h instead of libbtrfs/kerncompat.h, which will mess things up. Fix this by making sure we include our local copy of kerncompat.h first before we include any other header in btrfs-progs. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
54afdeecda
commit
78e5887fea
@ -22,14 +22,14 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#if BTRFS_FLAT_INCLUDES
|
||||
#include "libbtrfs/kerncompat.h"
|
||||
#include "kernel-lib/list.h"
|
||||
#include "kernel-lib/rbtree.h"
|
||||
#include "libbtrfs/kerncompat.h"
|
||||
#include "libbtrfs/ioctl.h"
|
||||
#else
|
||||
#include <btrfs/kerncompat.h>
|
||||
#include <btrfs/list.h>
|
||||
#include <btrfs/rbtree.h>
|
||||
#include <btrfs/kerncompat.h>
|
||||
#include <btrfs/ioctl.h>
|
||||
#endif /* BTRFS_FLAT_INCLUDES */
|
||||
|
||||
|
@ -24,10 +24,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include "kernel-lib/rbtree.h"
|
||||
#include "libbtrfs/ctree.h"
|
||||
#include "libbtrfs/send-utils.h"
|
||||
#include "libbtrfs/ioctl.h"
|
||||
#include "kernel-lib/rbtree.h"
|
||||
|
||||
static int btrfs_subvolid_resolve_sub(int fd, char *path, size_t *path_len,
|
||||
u64 subvol_id);
|
||||
|
Loading…
Reference in New Issue
Block a user