summaryrefslogtreecommitdiff
path: root/src/feature/dirauth/process_descs.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-08-29 09:50:38 -0400
committerNick Mathewson <nickm@torproject.org>2019-08-29 09:50:38 -0400
commit4256ee0d379daf35098c396757ce92b97b025c6e (patch)
treec5eebe3654a4cf3e1aa00a0e8cc10c56a28bebd5 /src/feature/dirauth/process_descs.h
parentff905f8e1e3a9df9349a82cfa2724cc50b1523f4 (diff)
downloadtor-4256ee0d379daf35098c396757ce92b97b025c6e.tar.gz
tor-4256ee0d379daf35098c396757ce92b97b025c6e.zip
Stub out some more functions in dirvote/*.h, fix compilation.
This fixes LTO compilation for Android and -O0 compilation in general, when --disable-module-dirauth is provided. Fixes bug 31552; bugfix on 0.4.1.1-alpha.
Diffstat (limited to 'src/feature/dirauth/process_descs.h')
-rw-r--r--src/feature/dirauth/process_descs.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/feature/dirauth/process_descs.h b/src/feature/dirauth/process_descs.h
index 001c866eba..0da47c96c3 100644
--- a/src/feature/dirauth/process_descs.h
+++ b/src/feature/dirauth/process_descs.h
@@ -25,15 +25,35 @@ enum was_router_added_t dirserv_add_descriptor(routerinfo_t *ri,
const char **msg,
const char *source);
-int authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg,
- int complain,
- int *valid_out);
uint32_t dirserv_router_get_status(const routerinfo_t *router,
const char **msg,
int severity);
void dirserv_set_node_flags_from_authoritative_status(node_t *node,
uint32_t authstatus);
+#ifdef HAVE_MODULE_DIRAUTH
int dirserv_would_reject_router(const routerstatus_t *rs);
+int authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg,
+ int complain,
+ int *valid_out);
+#else
+static inline int
+dirserv_would_reject_router(const routerstatus_t *rs)
+{
+ (void)rs;
+ return 0;
+}
+static inline int
+authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg,
+ int complain,
+ int *valid_out)
+{
+ (void)ri;
+ (void)msg;
+ (void)complain;
+ (void)valid_out;
+ return 0;
+}
+#endif
#endif /* !defined(TOR_RECV_UPLOADS_H) */