Commit Diff
Diff:
e4a632f44d7852a0b6febd4fae6466442b05b1f6
cc8b03f392d9b18202ce1bb685fa141589aa9331
Commit:
cc8b03f392d9b18202ce1bb685fa141589aa9331
Tree:
d17e0622935410b0d73f8bd3945c9ff61d2c37e3
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Thu Jan 5 09:27:51 2017 UTC
Message:
Make compiling the FreeBSD port work.
blob - b4aeb84d913d96f1bf2da572f3f8d39dfd2c2df9
blob + b608954d56dc7a0f6dbad3effd9856043dad8040
--- Makefile.freebsd
+++ Makefile.freebsd
@@ -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/local/include/db5/
-LDFLAGS= -Wall -g -L/usr/local/lib/db5/
-LDADD= -lcrypto -lssl -ldb
+.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 - ef7cd4bf4ce3ee93340e0bbb3df97f5538e5c557
blob + cc3abc9665020ea74e7fad66d85c8acf0bfd8974
--- configure
+++ configure
@@ -41,6 +41,9 @@ netbsd() {
freebsd() {
echo configuring for FreeBSD
cp Makefile.freebsd Makefile
+ cp delphinusdnsd/Makefile.freebsd delphinusdnsd/Makefile
+ cp dd-convert/Makefile.freebsd dd-convert/Makefile
+
}
linux() {
blob - /dev/null
blob + 0be8d23bac3de996432d17a65f1e7e527b8c469f (mode 644)
--- /dev/null
+++ dd-convert/Makefile.freebsd
@@ -0,0 +1,17 @@
+.PATH: ${.CURDIR}/..
+
+PROG=dd-convert
+
+SRCS=dd-convert.c parse.y base64.c dnssec.c util.c
+
+CFLAGS= -Wall -g -I/usr/local/include/db5 -I${.CURDIR}/..
+LDFLAGS= -Wall -g -L/usr/local/lib/db5
+LDADD= -lcrypto -lssl -ldb
+
+OBJDIR=.
+BINDIR=/usr/local/sbin
+MANDIR=/usr/local/man/man
+
+MAN= dd-convert.8
+
+.include <bsd.prog.mk>
blob - 6a9c713d3ace56e4f36e51f60cfc5084ff97d527
blob + 4a09c3dbaa53438034f1cec8e9c862df2c088852
--- dd-convert.c
+++ dd-convert.c
@@ -6059,7 +6059,7 @@ read_private_key(char *zonename, int keyid, int algori
fclose(f);
-#if __linux__
+#if defined __linux__ || defined __FreeBSD__
memset(buf, 0, sizeof(buf));
memset(key, 0, sizeof(key));
#else
blob - b4aeb84d913d96f1bf2da572f3f8d39dfd2c2df9
blob + 208e10a75e05070e5c81b5bd6dbb857d46ad53a4
--- delphinusdnsd/Makefile.freebsd
+++ delphinusdnsd/Makefile.freebsd
@@ -1,15 +1,20 @@
+.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/local/include/db5/
-LDFLAGS= -Wall -g -L/usr/local/lib/db5/
+#CFLAGS= -DDEBUG -g -Wall
+CFLAGS= -Wall -g -I/usr/local/include/db5
+CFLAGS+= -I${.CURDIR}/..
+LDFLAGS= -Wall -g -L/usr/local/lib/db5
LDADD= -lcrypto -lssl -ldb
+LDLIBS=
OBJDIR=.
BINDIR=/usr/local/sbin
-
MANDIR=/usr/local/man/man
+
MAN= delphinusdnsd.8
MAN+= delphinusdns.conf.5
repomaster@centroid.eu