Accepting request 259576 from home:dsterba:branches:filesystems
fix snapper build breakage OBS-URL: https://build.opensuse.org/request/show/259576 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=177
This commit is contained in:
parent
3ee7e4de90
commit
70bfa62031
@ -0,0 +1,99 @@
|
||||
From cafacda441120976105d01c07286e843cb7cbb94 Mon Sep 17 00:00:00 2001
|
||||
From: David Sterba <dsterba@suse.cz>
|
||||
Date: Mon, 3 Nov 2014 23:50:50 +0100
|
||||
Subject: [PATCH] btrfs-progs: libbtrfs, make exported headers compatible with
|
||||
C++
|
||||
|
||||
Add externs and don't use a reserved keyword.
|
||||
|
||||
Signed-off-by: David Sterba <dsterba@suse.cz>
|
||||
---
|
||||
rbtree-utils.h | 8 ++++++++
|
||||
rbtree.h | 10 +++++++++-
|
||||
rbtree_augmented.h | 8 ++++++++
|
||||
3 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rbtree-utils.h b/rbtree-utils.h
|
||||
index 7298c72eba3d..718581ff105c 100644
|
||||
--- a/rbtree-utils.h
|
||||
+++ b/rbtree-utils.h
|
||||
@@ -21,6 +21,10 @@
|
||||
|
||||
#include "rbtree.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
/* The common insert/search/free functions */
|
||||
typedef int (*rb_compare_nodes)(struct rb_node *node1, struct rb_node *node2);
|
||||
typedef int (*rb_compare_keys)(struct rb_node *node, void *key);
|
||||
@@ -42,4 +46,8 @@ static void free_##name##_tree(struct rb_root *root) \
|
||||
rb_free_nodes(root, free_func); \
|
||||
}
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
diff --git a/rbtree.h b/rbtree.h
|
||||
index 03c06d8ec16a..0d4f2bfd5a5e 100644
|
||||
--- a/rbtree.h
|
||||
+++ b/rbtree.h
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <btrfs/kerncompat.h>
|
||||
#endif /* BTRFS_FLAT_INCLUDES */
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
struct rb_node {
|
||||
unsigned long __rb_parent_color;
|
||||
struct rb_node *rb_right;
|
||||
@@ -75,7 +79,7 @@ extern struct rb_node *rb_first_postorder(const struct rb_root *);
|
||||
extern struct rb_node *rb_next_postorder(const struct rb_node *);
|
||||
|
||||
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
|
||||
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
|
||||
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *new_node,
|
||||
struct rb_root *root);
|
||||
|
||||
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
|
||||
@@ -107,4 +111,8 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
|
||||
typeof(*pos), field); 1; }); \
|
||||
pos = n)
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif /* _LINUX_RBTREE_H */
|
||||
diff --git a/rbtree_augmented.h b/rbtree_augmented.h
|
||||
index 079eb978dc4d..cbc963981667 100644
|
||||
--- a/rbtree_augmented.h
|
||||
+++ b/rbtree_augmented.h
|
||||
@@ -26,6 +26,10 @@
|
||||
|
||||
#include "rbtree.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Please note - only struct rb_augment_callbacks and the prototypes for
|
||||
* rb_insert_augmented() and rb_erase_augmented() are intended to be public.
|
||||
@@ -228,4 +232,8 @@ rb_erase_augmented(struct rb_node *node, struct rb_root *root,
|
||||
__rb_erase_color(rebalance, root, augment->rotate);
|
||||
}
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif /* _LINUX_RBTREE_AUGMENTED_H */
|
||||
--
|
||||
2.1.1
|
||||
|
@ -32,6 +32,7 @@ Mon Nov 3 00:00:00 CET 2014 - dsterba@suse.cz
|
||||
* 0010-btrfs-progs-move-group-type-and-profile-pretty-print.patch
|
||||
* 0028-btrfs-progs-rework-calculations-of-fi-usage.patch
|
||||
* 0042-btrfs-progs-fix-linking-with-libbtrfs.patch
|
||||
* 0043-btrfs-progs-libbtrfs-make-exported-headers-compatibl.patch
|
||||
- Removed patches:
|
||||
* 0006-Btrfs-progs-fsck-clear-out-log-tree-in-repair-mode.patch
|
||||
* 0007-Btrfs-progs-fsck-avoid-pinning-same-block-several-ti.patch
|
||||
|
@ -51,6 +51,7 @@ Patch29: 0029-btrfs-progs-replace-df_pretty_sizes-with-pretty_size.patch
|
||||
Patch30: 0030-btrfs-progs-clean-up-return-codes-and-paths.patch
|
||||
Patch31: 0031-btrfs-progs-move-global-reserve-to-overall-summary.patch
|
||||
Patch42: 0042-btrfs-progs-fix-linking-with-libbtrfs.patch
|
||||
Patch43: 0043-btrfs-progs-libbtrfs-make-exported-headers-compatibl.patch
|
||||
|
||||
Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch
|
||||
Patch167: 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch
|
||||
@ -116,6 +117,7 @@ build applications to interface with btrfs.
|
||||
%patch31 -p1
|
||||
%patch28 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch163 -p1
|
||||
%patch167 -p1
|
||||
%patch168 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user