summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-10-08 14:44:50 +1100
committerDarren Tucker <dtucker@dtucker.net>2019-10-08 14:48:32 +1100
commit0c7f8d2326d812b371f7afd63aff846973ec80a4 (patch)
tree9d0959b62459c60b30fbbbb653036693477583c9 /defines.h
parentb1e79ea8fae9c252399677a28707661d85c7d00c (diff)
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@
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/defines.h b/defines.h
index e37e1647e..7855fbf90 100644
--- a/defines.h
+++ b/defines.h
@@ -839,9 +839,10 @@ struct winsize {
839/* 839/*
840 * We want functions in openbsd-compat, if enabled, to override system ones. 840 * We want functions in openbsd-compat, if enabled, to override system ones.
841 * We no-op out the weak symbol definition rather than remove it to reduce 841 * We no-op out the weak symbol definition rather than remove it to reduce
842 * future sync problems. 842 * future sync problems. Some compilers (eg Unixware) do not allow an
843 * empty statement, so we use a bogus function declaration.
843 */ 844 */
844#define DEF_WEAK(x) 845#define DEF_WEAK(x) void __ssh_compat_weak_##x(void)
845 846
846/* 847/*
847 * Platforms that have arc4random_uniform() and not arc4random_stir() 848 * Platforms that have arc4random_uniform() and not arc4random_stir()