From b911b2f6edaa8ee45b1f860ddf0cf061ccc96e1f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 7 Jan 2020 22:39:29 +0100 Subject: Only define likely/unlikely if APT_COMPILING_APT set This ensures that we do not leak simple words like that. --- apt-pkg/contrib/macros.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/contrib/macros.h') diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index 3f2638070..340549fbd 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -29,6 +29,7 @@ #define APT_GCC_VERSION 0 #endif +#ifdef APT_COMPILING_APT /* likely() and unlikely() can be used to mark boolean expressions as (not) likely true which will help the compiler to optimise */ #if APT_GCC_VERSION >= 0x0300 @@ -38,6 +39,7 @@ #define likely(x) (x) #define unlikely(x) (x) #endif +#endif #if APT_GCC_VERSION >= 0x0300 #define APT_DEPRECATED __attribute__ ((deprecated)) -- cgit v1.2.3