summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2017-08-15 05:13:40 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2017-08-15 05:13:40 (GMT)
commit03a9d11a59cec2047ec1282e0dfa76ef1f248a18 (patch) (side-by-side diff)
treee1bb32b95c9edb5a2cbceb46b27ffd5d1227ac91
parent5d9f2f079856185cf6530e1807f2dfe26bd05996 (diff)
downloadnssync-03a9d11a59cec2047ec1282e0dfa76ef1f248a18.tar.gz
nssync-03a9d11a59cec2047ec1282e0dfa76ef1f248a18.tar.bz2
Fix build without libmicrohttpd
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/Makefile.am2
-rw-r--r--src/noserver.c8
-rw-r--r--src/nssync.c1
-rw-r--r--src/server.c2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 8aa4e09..e2e3783 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,6 +26,8 @@ nssync_SOURCES = \
if COND_MICROHTTPD
nssync_SOURCES += server.c
+else
+ nssync_SOURCES += noserver.c
endif
LDADD=@GRECS_LDADD@ ../runcap/libruncap.a
diff --git a/src/noserver.c b/src/noserver.c
new file mode 100644
index 0000000..5b43508
--- a/dev/null
+++ b/src/noserver.c
@@ -0,0 +1,8 @@
+#include "nssync.h"
+
+void
+nssync_server(void)
+{
+ error("compiled without HTTPD support");
+ exit(EX_UNAVAILABLE);
+}
diff --git a/src/nssync.c b/src/nssync.c
index 8cd9939..e18100c 100644
--- a/src/nssync.c
+++ b/src/nssync.c
@@ -33,6 +33,7 @@ struct json_value *error_list;
struct json_value *changed_zones;
int check_ns;
int server_mode;
+struct grecs_sockaddr *server_addr;
#include "cmdline.h"
diff --git a/src/server.c b/src/server.c
index 6db8da6..ae0d755 100644
--- a/src/server.c
+++ b/src/server.c
@@ -7,8 +7,6 @@
#define MHD_PLATFORM_H
#include <microhttpd.h>
-struct grecs_sockaddr *server_addr;
-
static int
setup_listen_socket(struct grecs_sockaddr *sa, int fd)
{

Return to:

Send suggestions and report system problems to the System administrator.