]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: rename BUILD_BUG_ON_ZERO definition
authorSami Kerola <kerolasa@iki.fi>
Sat, 1 Oct 2011 11:58:51 +0000 (13:58 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 10 Oct 2011 11:57:16 +0000 (13:57 +0200)
Definition name is changed to UL_BUILD_BUG_ON_ZERO to avoid collision
with a system header.

../include/c.h:72:1: warning: "BUILD_BUG_ON_ZERO" redefined
In file included from /usr/include/sys/sysinfo.h:25,
                 from dmesg.c:16:
/usr/include/linux/kernel.h:34:1: warning: this is the location of the previous definition

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/c.h

index f5b4bcd44d562454cde7c8184bd6e83ffe0cc349..259e6b6ccea297f44f7dc15b3283dfe97e3b215a 100644 (file)
@@ -33,7 +33,7 @@
 
 /* &a[0] degrades to a pointer: a different type from an array */
 # define __must_be_array(a) \
-       BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
+       UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
 
 # define ignore_result(x) ({ \
        __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; \
@@ -69,7 +69,7 @@
  * e.g. in a structure initializer (or where-ever else comma expressions
  * aren't permitted).
  */
-#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
+#define UL_BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
 #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); }))
 
 #ifndef ARRAY_SIZE