Commit Diff
Diff:
7f18567376aa73c8fc57517d132b0c4312b7015c
50190f1e0780f36b1203cf182b4419edc11656d6
Commit:
50190f1e0780f36b1203cf182b4419edc11656d6
Tree:
a62cb0970608bd8600ba5a72985fbcb9cedbbb85
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Sat Feb 16 11:44:32 2013 UTC
Message:
* Mac OS X support from Mecca on Efnet. I tweaked this a little so that it compiles against MacPorts Berkeley DB 4.8. Also I reflected the change in the README. compiles on Mac OS X does not run but could be due to sandboxing/ACL's? I could really need someone good with Mac OS X to look over this and fix it and send patches to me. -pjp
blob - f014681cbd8b1fc3198be6beb1cb8ec2b08d7464
blob + 012c8509198de3fd1a8f6c474c55e888439c7240
--- Makefile.macosx
+++ Makefile.macosx
@@ -1,8 +1,8 @@
+PROG=wildcarddnsd
CC=gcc
-#CFLAGS=-DDEBUG
-CFLAGS=
+CFLAGS=-I/opt/local/include/db48 -L/opt/local/lib/db48 -D__APPLE_USE_RFC_3542=1
+LDADD=-ldb -lssl -lcrypto -DDEFAULT_PRIVILEGE="nobody"
-
build:
$(CC) $(CFLAGS) -c additional.c
$(CC) $(CFLAGS) -c main.c
@@ -11,7 +11,11 @@ build:
$(CC) $(CFLAGS) -c region.c
$(CC) $(CFLAGS) -c wildcard.c
$(CC) $(CFLAGS) -c log.c
- $(CC) $(CFLAGS) -o wildcarddnsd additional.o main.o parse.o reply.o region.o wildcard.o log.o
+ $(CC) $(CFLAGS) -c recurse.c
+ $(CC) $(CFLAGS) -c axfr.c
+ $(CC) $(CFLAGS) -c res_random.c
+ $(CC) $(CFLAGS) -c bsd-arc4random.c
+ $(CC) $(CFLAGS) -o wildcarddnsd additional.o main.o parse.o reply.o region.o wildcard.o log.o recurse.o axfr.o res_random.c bsd-arc4random.o $(LDADD)
clean:
- rm -f *.o wildcarddnsd
+ rm -f *.o wildcarddnsd config.h Makefile
blob - 0a935ca3be4e621d78ebc02c3ad34890749da959
blob + c8b4ee171f986cb8fd716dab334bf037f11cafaf
--- README
+++ README
@@ -1,4 +1,4 @@
-$Id: README,v 1.22 2011/09/19 20:50:40 pbug Exp $
+$Id: README,v 1.23 2013/02/16 11:44:32 pjp Exp $
1. README
2. WHY WILDCARDNS?
@@ -44,7 +44,8 @@ Under OpenSuse 10.3 and Ubuntu I noticed the following
cvs, gcc development and sleepycat's berkeley db (4.8) development. These
had to be install prior to making wildcarddnsd. You basically know when you
need to install these, when make barfs with db.h missing (or in extreme cases
-sys/param.h missing).
+sys/param.h missing). In Mac OS X Mountain Lion I installed berkeley db 4.8
+through Mac Ports.
By default installation the configuration file is not installed you need to
do this manually. Also by default the config file is specified as
@@ -80,6 +81,10 @@ Ubuntu 10.10 | yes | yes
------------------+--------------------+---------------------+
Debian 6.0 | yes | yes |
------------------+--------------------+---------------------+
+Mac OS X Mountain | yes | unknown, I can't get|
+ Lion | | it to run, acls? |
+------------------+--------------------+---------------------+
+
* there was a period in time that NetBSD didn't compile
** All Operating Systems require Berkeley DB 4.6 or higher.
blob - d81355ca208a8df9ad10507b011894c6db858808
blob + 3d1c59afcf004aeb8f850e90ed81e499f87136b0
--- include.h
+++ include.h
@@ -74,7 +74,7 @@
#include "endian.h"
#endif
-#if defined __linux__ || defined __FreeBSD__
+#if !defined __OpenBSD__ && !defined __NetBSD__
struct ip6_hdr_pseudo {
struct in6_addr ip6ph_src;
struct in6_addr ip6ph_dst;
blob - b5f1b10b047a281945e7cf6826663b59bbb96237
blob + 2cc8b8e3dc502a7d68de7ff78f0abd385d2d0e10
--- main.c
+++ main.c
@@ -138,7 +138,7 @@ struct tcps {
} *tn1, *tn2, *tnp;
-static const char rcsid[] = "$Id: main.c,v 1.74 2012/06/21 08:50:52 pbug Exp $";
+static const char rcsid[] = "$Id: main.c,v 1.75 2013/02/16 11:44:32 pjp Exp $";
/*
* MAIN - set up arguments, set up database, set up sockets, call mainloop
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
bind_list[bcount++] = optarg;
break;
case 'c':
-#if defined __NetBSD__ || defined __linux__
+#if !defined __OpenBSD__ && !defined __NetBSD__
cachesize = atoi(optarg);
#else
cachesize = strtonum(optarg, 1, 0xffffffff, NULL);
@@ -868,7 +868,7 @@ main(int argc, char *argv[])
close(raw[1]);
}
-#ifndef __linux__
+#if !defined __linux__ && !defined __APPLE__
setproctitle("AXFR engine on port %d", axfrport);
#endif
@@ -3179,7 +3179,7 @@ setup_master(DB *db, DB_ENV *dbenv, int port, char **a
pid_t pid;
int fd, ret;
-#ifndef __linux__
+#if !defined __linux__ && !defined __APPLE__
setproctitle("wildcarddnsd master on port %u", port);
#endif
repomaster@centroid.eu