Skip to content

Commit

Permalink
BUILD: SLE12: revert "graphdriver/btrfs: use kernel UAPI headers"
Browse files Browse the repository at this point in the history
This reverts commit 3208dca.

On SLE 12, our UAPI headers are too old, resulting in us being unable to
build the btrfs driver with the new headers. This patch is only needed
for SLE-12.

Signed-off-by: Aleksa Sarai <[email protected]>
  • Loading branch information
cyphar committed Dec 11, 2024
1 parent dcbc247 commit 7b07c25
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions daemon/graphdriver/btrfs/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ package btrfs // import "github.com/docker/docker/daemon/graphdriver/btrfs"

/*
#include <stdlib.h>
#include <stdio.h>
#include <dirent.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
#error "Headers from kernel >= 4.12 are required to build with Btrfs support."
#error "HINT: Set 'DOCKER_BUILDTAGS=exclude_graphdriver_btrfs' to build without Btrfs."
#endif
#include <linux/btrfs.h>
#include <linux/btrfs_tree.h>
// keep struct field name compatible with btrfs-progs < 6.1.
#define max_referenced max_rfer
#include <btrfs/ioctl.h>
#include <btrfs/ctree.h>
static void set_name_btrfs_ioctl_vol_args_v2(struct btrfs_ioctl_vol_args_v2* btrfs_struct, const char* value) {
snprintf(btrfs_struct->name, BTRFS_SUBVOL_NAME_MAX, "%s", value);
Expand Down

0 comments on commit 7b07c25

Please sign in to comment.