From f2787e316f478de63a8e06417a595b651ca61abb Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Fri, 13 Jan 2023 10:19:11 +0100 Subject: [PATCH] - use libbtrfsutil when building for openSUSE Tumbleweed --- snapper.spec.in | 3 +++ snapper/BtrfsUtils.cc | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/snapper.spec.in b/snapper.spec.in index 9fed7e9c..b21a144a 100644 --- a/snapper.spec.in +++ b/snapper.spec.in @@ -55,6 +55,9 @@ BuildRequires: ncurses-devel %if 0%{?suse_version} BuildRequires: libbtrfs-devel %endif +%if 0%{?suse_version} >= 1550 +BuildRequires: libbtrfsutil-devel +%endif %if 0%{?suse_version} > 1310 BuildRequires: libmount-devel >= 2.24 %endif diff --git a/snapper/BtrfsUtils.cc b/snapper/BtrfsUtils.cc index 4a1a28da..e104e916 100644 --- a/snapper/BtrfsUtils.cc +++ b/snapper/BtrfsUtils.cc @@ -1,6 +1,6 @@ /* * Copyright (c) [2011-2015] Novell, Inc. - * Copyright (c) [2016-2020] SUSE LLC + * Copyright (c) [2016-2023] SUSE LLC * * All Rights Reserved. * @@ -143,7 +143,6 @@ namespace snapper else if (errno != ENOTTY && errno != EINVAL) throw runtime_error_with_errno("btrfs_util_create_snapshot_fd2() failed", errno); - /* No BTRFS_IOC_SNAP_CREATE fallback */ #else struct btrfs_ioctl_vol_args_v2 args_v2; memset(&args_v2, 0, sizeof(args_v2)); -- 2.47.3