From: Nick Mathewson Date: Tue, 30 Apr 2019 15:25:41 +0000 (-0400) Subject: Make the recommend_pkg file dirauth-only. X-Git-Tag: tor-0.4.1.1-alpha~37^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=853942b71e1a397cbe025dd9c101ccbab4bdaa11;p=thirdparty%2Ftor.git Make the recommend_pkg file dirauth-only. --- diff --git a/src/core/include.am b/src/core/include.am index 4ec42182a6..dba957b6b5 100644 --- a/src/core/include.am +++ b/src/core/include.am @@ -157,7 +157,6 @@ LIBTOR_APP_A_SOURCES += \ src/feature/dirauth/dsigs_parse.c \ src/feature/dirauth/guardfraction.c \ src/feature/dirauth/reachability.c \ - src/feature/dirauth/recommend_pkg.c \ src/feature/dirauth/process_descs.c \ src/feature/dirauth/voteflags.c @@ -180,6 +179,7 @@ MODULE_DIRAUTH_SOURCES = \ src/feature/dirauth/dirauth_sys.c \ src/feature/dirauth/dircollate.c \ src/feature/dirauth/dirvote.c \ + src/feature/dirauth/recommend_pkg.c \ src/feature/dirauth/shared_random.c \ src/feature/dirauth/shared_random_state.c diff --git a/src/feature/dirauth/recommend_pkg.h b/src/feature/dirauth/recommend_pkg.h index 8200d78f72..1f97d50177 100644 --- a/src/feature/dirauth/recommend_pkg.h +++ b/src/feature/dirauth/recommend_pkg.h @@ -12,6 +12,18 @@ #ifndef TOR_RECOMMEND_PKG_H #define TOR_RECOMMEND_PKG_H +#ifdef HAVE_MODULE_DIRAUTH int validate_recommended_package_line(const char *line); +#else + +static inline int +validate_recommended_package_line(const char *line) +{ + (void) line; + return 0; +} + +#endif + #endif