summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/include.am2
-rw-r--r--src/feature/relay/relay_periodic.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/core/include.am b/src/core/include.am
index 193b10a1cc..5cafc41210 100644
--- a/src/core/include.am
+++ b/src/core/include.am
@@ -143,7 +143,6 @@ LIBTOR_APP_A_SOURCES = \
src/feature/relay/dns.c \
src/feature/relay/ext_orport.c \
src/feature/relay/onion_queue.c \
- src/feature/relay/relay_periodic.c \
src/feature/relay/relay_sys.c \
src/feature/relay/router.c \
src/feature/relay/routerkeys.c \
@@ -174,6 +173,7 @@ LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
MODULE_RELAY_SOURCES = \
src/feature/relay/routermode.c \
src/feature/relay/relay_config.c \
+ src/feature/relay/relay_periodic.c \
src/feature/relay/transport_config.c
# The Directory Authority module.
diff --git a/src/feature/relay/relay_periodic.h b/src/feature/relay/relay_periodic.h
index b6ea83c749..8da5b536a7 100644
--- a/src/feature/relay/relay_periodic.h
+++ b/src/feature/relay/relay_periodic.h
@@ -12,7 +12,20 @@
#ifndef TOR_FEATURE_RELAY_RELAY_PERIODIC_H
#define TOR_FEATURE_RELAY_RELAY_PERIODIC_H
+#ifdef HAVE_MODULE_RELAY
+
void relay_register_periodic_events(void);
void reschedule_descriptor_update_check(void);
+#else
+
+#include "lib/cc/compat_compiler.h"
+
+#define relay_register_periodic_events() \
+ STMT_NIL
+#define reschedule_descriptor_update_check() \
+ STMT_NIL
+
+#endif
+
#endif /* !defined(TOR_FEATURE_RELAY_RELAY_PERIODIC_H) */