From d96671ae54ca1f9cbc47ac4494421b7af7a5cf65 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 13 Nov 2018 13:28:09 +0100 Subject: btrfs-progs: kerncompat: rename swap to __swap The 'swap' is too generic and clashes with some userspace tools that compile against btrfs, eg. snapper when including boost::smart_ptr::scoped_array after kerncompat.h: /usr/include/boost/smart_ptr/scoped_array.hpp:127:13: error: macro "swap" requires 2 arguments, but only 1 given a.swap(b); Signed-off-by: David Sterba --- kerncompat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kerncompat.h') diff --git a/kerncompat.h b/kerncompat.h index c33e485f..08133164 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -266,11 +266,11 @@ static inline int IS_ERR_OR_NULL(const void *ptr) #define div_u64(x, y) ((x) / (y)) /** - * swap - swap values of @a and @b + * __swap - swap values of @a and @b * @a: first value * @b: second value */ -#define swap(a, b) \ +#define __swap(a, b) \ do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) /* -- cgit v1.2.3