From 2285b9527bb83aeee49f7058c2a59008bca0ca73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 6 Jun 2022 08:04:59 +0000 Subject: [PATCH] lib: avoid redefinition of _AC() macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kernel already provides the same macro as does the zt_common.h file, thus check for its availability first. CC zconf/qeth/lsqeth.o In file included from ../../include/lib/util_base.h:17, from lsqeth.c:30: ../../include/lib/zt_common.h:27: warning: "_AC" redefined 27 | #define _AC(X, TYPE) X##TYPE | In file included from /usr/include/linux/ethtool.h:17, from lsqeth.c:12: /usr/include/linux/const.h:21: note: this is the location of the previous definition 21 | #define _AC(X,Y) __AC(X,Y) | GitHub-ID: https://github.com/ibm-s390-linux/s390-tools/pull/137 Signed-off-by: Dan Horák Signed-off-by: Jan Höppner --- include/lib/zt_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/lib/zt_common.h b/include/lib/zt_common.h index cb8e30e2..437a2915 100644 --- a/include/lib/zt_common.h +++ b/include/lib/zt_common.h @@ -21,11 +21,13 @@ * Usage example: * #define IMAGE_ENTRY _AC(0x10000, UL) */ +#ifndef _AC #ifdef __ASSEMBLER__ #define _AC(X, TYPE) X #else #define _AC(X, TYPE) X##TYPE #endif +#endif #ifndef __ASSEMBLER__