diff options
author | cypherpunks <cypherpunks@torproject.org> | 2016-08-23 13:07:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-08 07:48:19 -0500 |
commit | 9fe6ffa58864b0719bdec9a55b84c11255fa505b (patch) | |
tree | a03c9db993f77246509e0855331435d40395117e | |
parent | d838a812bd17f9bf68b77b5771c2388b82e17f15 (diff) | |
download | tor-9fe6ffa58864b0719bdec9a55b84c11255fa505b.tar.gz tor-9fe6ffa58864b0719bdec9a55b84c11255fa505b.zip |
Use the correct preprocessor macro for Linux
Also combine all of the checks into one if-tree as only one of them
should actually succeed.
-rw-r--r-- | src/test/test_options.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c index 2570f8ddb4..e85e11805b 100644 --- a/src/test/test_options.c +++ b/src/test/test_options.c @@ -1071,7 +1071,7 @@ test_options_validate__transproxy(void *ignored) free_options_test_data(tdata); tdata = NULL; -#if defined(linux) +#if defined(__linux__) tdata = get_options_test_data("TransProxyType tproxy\n" "TransPort 127.0.0.1:123\n"); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); @@ -1079,8 +1079,7 @@ test_options_validate__transproxy(void *ignored) if (msg) { TT_DIE(("Expected NULL but got '%s'", msg)); } -#endif -#ifdef KERNEL_MAY_SUPPORT_IPFW +#elif defined(KERNEL_MAY_SUPPORT_IPFW) tdata = get_options_test_data("TransProxyType ipfw\n" "TransPort 127.0.0.1:123\n"); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); @@ -1088,8 +1087,7 @@ test_options_validate__transproxy(void *ignored) if (msg) { TT_DIE(("Expected NULL but got '%s'", msg)); } -#endif -#if defined(__OpenBSD__) +#elif defined(__OpenBSD__) tdata = get_options_test_data("TransProxyType pf-divert\n" "TransPort 127.0.0.1:123\n"); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); @@ -1097,8 +1095,7 @@ test_options_validate__transproxy(void *ignored) if (msg) { TT_DIE(("Expected NULL but got '%s'", msg)); } -#endif -#if defined(__NetBSD__) +#elif defined(__NetBSD__) tdata = get_options_test_data("TransProxyType default\n" "TransPort 127.0.0.1:123\n"); ret = options_validate(tdata->old_opt, tdata->opt, tdata->def_opt, 0, &msg); |