From: Darren Tucker Date: Tue, 8 Oct 2019 03:44:50 +0000 (+1100) Subject: Make DEF_WEAK more likely to be correct. X-Git-Tag: V_8_1_P1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c7f8d2326d812b371f7afd63aff846973ec80a4;p=thirdparty%2Fopenssh-portable.git Make DEF_WEAK more likely to be correct. Completely nop-ing out DEF_WEAK leaves an empty statemment which some compilers don't like. Replace with a no-op function template. ok djm@ --- diff --git a/defines.h b/defines.h index e37e1647e..7855fbf90 100644 --- a/defines.h +++ b/defines.h @@ -839,9 +839,10 @@ struct winsize { /* * We want functions in openbsd-compat, if enabled, to override system ones. * We no-op out the weak symbol definition rather than remove it to reduce - * future sync problems. + * future sync problems. Some compilers (eg Unixware) do not allow an + * empty statement, so we use a bogus function declaration. */ -#define DEF_WEAK(x) +#define DEF_WEAK(x) void __ssh_compat_weak_##x(void) /* * Platforms that have arc4random_uniform() and not arc4random_stir()