From: lawadr <3211473+lawadr@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:46:35 +0000 (+0000) Subject: Add member to cpu_features struct if empty X-Git-Tag: 2.1.0-beta1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39008be53b94f6ad7704bff27b4ecd6a8067d2ef;p=thirdparty%2Fzlib-ng.git Add member to cpu_features struct if empty When WITH_OPTIM is off, the cpu_features struct is empty. This is not allowed in standard C and causes a build failure with various compilers, including MSVC. This adds a dummy char member to the struct if it would otherwise be empty. --- diff --git a/cpu_features.h b/cpu_features.h index 14eb19a75..462671a18 100644 --- a/cpu_features.h +++ b/cpu_features.h @@ -29,6 +29,8 @@ struct cpu_features { struct power_cpu_features power; #elif defined(S390_FEATURES) struct s390_cpu_features s390; +#else + char empty; #endif };