From 5e2318165dba782f6daa6620b17e0fa1e72b4b11 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sun, 15 Dec 2019 18:10:11 -0500 Subject: Add "stub" files for disabled modules. These modules are only built when the selected modules are disabled. The provide stub implementations of the subsystem blocks. Later, other stub implementations could move here. Having real subsystem blocks here will let us handle disabled configuration options better. --- src/feature/dirauth/dirauth_stub.c | 19 +++++++++++++++++++ src/feature/dirauth/dirauth_sys.h | 4 ---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 src/feature/dirauth/dirauth_stub.c (limited to 'src/feature/dirauth') diff --git a/src/feature/dirauth/dirauth_stub.c b/src/feature/dirauth/dirauth_stub.c new file mode 100644 index 0000000000..fac68edd09 --- /dev/null +++ b/src/feature/dirauth/dirauth_stub.c @@ -0,0 +1,19 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2019, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * @file dirauth_stub.c + * @brief Stub declarations for use when dirauth module is disabled. + **/ + +#include "orconfig.h" +#include "feature/dirauth/dirauth_sys.h" + +const struct subsys_fns_t sys_dirauth = { + .name = "dirauth", + .supported = false, + .level = 70, +}; diff --git a/src/feature/dirauth/dirauth_sys.h b/src/feature/dirauth/dirauth_sys.h index 86c8d8ba3e..2d5a0cb3e7 100644 --- a/src/feature/dirauth/dirauth_sys.h +++ b/src/feature/dirauth/dirauth_sys.h @@ -12,10 +12,6 @@ #ifndef DIRAUTH_SYS_H #define DIRAUTH_SYS_H -#ifdef HAVE_MODULE_DIRAUTH - extern const struct subsys_fns_t sys_dirauth; -#endif - #endif /* !defined(DIRAUTH_SYS_H) */ -- cgit v1.2.3-54-g00ecf