Commit Diff
Diff:
422a6676b8cd9a23ba41eca5ce5fbf1ba8a8bd04
55f79a4f7bb8ddc5952dcc54c032f99ad133ad05
Commit:
55f79a4f7bb8ddc5952dcc54c032f99ad133ad05
Tree:
f5e56a019fb12c8bd44e8d74e63bc6e8e7bb90db
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Fri Jan 6 10:54:06 2017 UTC
Message:
Make NetBSD compile.
blob - 84a3adefa7316dbc1344455ddcc259c7400bf9c6
blob + b608954d56dc7a0f6dbad3effd9856043dad8040
--- Makefile.netbsd
+++ Makefile.netbsd
@@ -1,16 +1,6 @@
-PROG=delphinusdnsd
+.include <bsd.own.mk>
-SRCS=main.c parse.y reply.c additional.c region.c log.c axfr.c filter.c ratelimit.c whitelist.c base64.c dnssec.c
+SUBDIR= delphinusdnsd dd-convert
-CFLAGS= -Wall -g -I/usr/pkg/include/db5/
-LDFLAGS= -Wall -g -L/usr/pkg/lib -R/usr/pkg/lib
-LDADD= -lcrypto -lssl -ldb5
+.include <bsd.subdir.mk>
-OBJDIR=.
-BINDIR=/usr/local/sbin
-MANDIR=/usr/local/man/man
-
-MAN= delphinusdnsd.8
-MAN+= delphinusdns.conf.5
-
-.include <bsd.prog.mk>
blob - cc3abc9665020ea74e7fad66d85c8acf0bfd8974
blob + 05c2ec37c557bc5792e49ba8fe1148640adceca6
--- configure
+++ configure
@@ -36,6 +36,8 @@ openbsd() {
netbsd() {
echo configuring for NetBSD
cp Makefile.netbsd Makefile
+ cp delphinusdnsd/Makefile.netbsd delphinusdnsd/Makefile
+ cp dd-convert/Makefile.netbsd dd-convert/Makefile
}
freebsd() {
@@ -43,7 +45,6 @@ freebsd() {
cp Makefile.freebsd Makefile
cp delphinusdnsd/Makefile.freebsd delphinusdnsd/Makefile
cp dd-convert/Makefile.freebsd dd-convert/Makefile
-
}
linux() {
blob - /dev/null
blob + 8c2f600d63d305a1bab4f2af6ce6e713421bd7fb (mode 644)
--- /dev/null
+++ dd-convert/Makefile.netbsd
@@ -0,0 +1,18 @@
+.PATH: ${.CURDIR}/..
+
+PROG=dd-convert
+
+SRCS=dd-convert.c parse.y base64.c dnssec.c util.c
+
+CFLAGS= -g -I/usr/pkg/include/db5/
+CFLAGS+= -I${.CURDIR}/..
+LDFLAGS= -g -L/usr/pkg/lib -R/usr/pkg/lib
+LDADD= -lcrypto -lssl -ldb5
+
+OBJDIR=.
+BINDIR=/usr/local/sbin
+MANDIR=/usr/local/man/man
+
+MAN= dd-convert.8
+
+.include <bsd.prog.mk>
blob - 2ce82d3322db496440c2039cae5bb7564fbf0409
blob + cdab6b66eed23a3010647ad10f24e69bca66ec0c
--- dd-convert.c
+++ dd-convert.c
@@ -6071,12 +6071,12 @@ read_private_key(char *zonename, int keyid, int algori
fclose(f);
-#if defined __linux__ || defined __FreeBSD__
- memset(buf, 0, sizeof(buf));
- memset(key, 0, sizeof(key));
-#else
+#if __OpenBSD__
explicit_bzero(buf, sizeof(buf));
explicit_bzero(key, sizeof(key));
+#else
+ memset(buf, 0, sizeof(buf));
+ memset(key, 0, sizeof(key));
#endif
return (rsa);
blob - 84a3adefa7316dbc1344455ddcc259c7400bf9c6
blob + 97192608b55dbf2242a6385cbd3656b197d2d08a
--- delphinusdnsd/Makefile.netbsd
+++ delphinusdnsd/Makefile.netbsd
@@ -1,10 +1,14 @@
+.PATH: ${.CURDIR}/..
+
PROG=delphinusdnsd
-SRCS=main.c parse.y reply.c additional.c region.c log.c axfr.c filter.c ratelimit.c whitelist.c base64.c dnssec.c
+SRCS=delphinusdnsd.c parse.y reply.c additional.c region.c log.c axfr.c filter.c ratelimit.c whitelist.c base64.c dnssec.c util.c
-CFLAGS= -Wall -g -I/usr/pkg/include/db5/
-LDFLAGS= -Wall -g -L/usr/pkg/lib -R/usr/pkg/lib
+CFLAGS= -g -I/usr/pkg/include/db5/
+CFLAGS+= -I${.CURDIR}/..
+LDFLAGS= -g -L/usr/pkg/lib -R/usr/pkg/lib
LDADD= -lcrypto -lssl -ldb5
+
OBJDIR=.
BINDIR=/usr/local/sbin
repomaster@centroid.eu