diff options
author | Kris Katterjohn <katterjohn@gmail.com> | 2018-12-23 14:51:45 -0600 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-09 08:51:57 -0500 |
commit | c13a81f7f96a6433709b90c343d358c93cc7b9f8 (patch) | |
tree | 3de272b5929dcbcb0b77f4a6f1d5316d64925c4b /src/app | |
parent | 44edfa7adcc3f9006397e525b0c4e333ea4ee429 (diff) | |
download | tor-c13a81f7f96a6433709b90c343d358c93cc7b9f8.tar.gz tor-c13a81f7f96a6433709b90c343d358c93cc7b9f8.zip |
Fix (and make consistent) the use of OpenBSD preprocessor macro tests
Prior to this commit, the testsuite was failing on OpenBSD. After
this commit the testsuite runs fine on OpenBSD.
It was previously decided to test for the OpenBSD macro (rather than
__OpenBSD__, etc.) because OpenBSD forks seem to have the former
macro defined. sys/param.h must be included for the OpenBSD macro
definition; however, many files tested for the OpenBSD macro without
having this header included.
This commit includes sys/param.h in the files where the OpenBSD macro
is used (and sys/param.h is not already included), and it also
changes some instances of the __OpenBSD__ macro to OpenBSD.
See commit 27df23abb675ffeb198bf0c1cc85c4baed77a988 which changed
everything to use OpenBSD instead of __OpenBSD__ or OPENBSD. See
also tickets #6982 and #20980 (the latter ticket is where it was
decided to use the OpenBSD macro).
Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/config/config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index 4a8f94da0e..c71ed01843 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -131,6 +131,9 @@ #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif |