]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Make DEF_WEAK more likely to be correct.
authorDarren Tucker <dtucker@dtucker.net>
Tue, 8 Oct 2019 03:44:50 +0000 (14:44 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 8 Oct 2019 03:48:32 +0000 (14:48 +1100)
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@

defines.h

index e37e1647e9567066acd401b6f22b1a60583b638b..7855fbf90b0f66e41c6b06f4f99871c73a73e9ee 100644 (file)
--- 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()