Commit Diff
Diff:
b3729a69128dd80216fea183401fd35850d33962
3f255a8fa14b0e072ab254b061a77200134e1ad5
Commit:
3f255a8fa14b0e072ab254b061a77200134e1ad5 (tags/BETA_6)
Tree:
cab6129504f2039dac6c5c31d489c271709fab90
Author:
pbug <pbug@delphinusdns.org>
Committer:
pbug <pbug@delphinusdns.org>
Date:
Tue Apr 19 16:33:46 2011 UTC
Message:
* make netbsd happy
blob - 96cc437a5e15237a1313d9ccd02edcfe32f7e7ac
blob + 826ba15add3ba037c48a033d896e3cdfe70b2d8b
--- README
+++ README
@@ -1,4 +1,4 @@
-$Id: README,v 1.18 2011/04/12 09:32:31 pbug Exp $
+$Id: README,v 1.19 2011/04/19 16:33:46 pbug Exp $
1. README
2. WHY WILDCARDNS?
@@ -64,17 +64,17 @@ you may have to install openssl-dev packages.
------------------+--------------------+---------------------+
Operating System: | makes and compiles | responds to queries |
------------------+--------------------+---------------------+
-OpenSuse 10.3 | yes | yes |
+FreeBSD 7.3 | yes | yes |
------------------+--------------------+---------------------+
-FreeBSD 7.2 | yes | yes |
+FreeBSD 8.2 | yes | yes |
------------------+--------------------+---------------------+
NetBSD 5.1 | yes* | yes |
------------------+--------------------+---------------------+
-OpenBSD 4.6 | yes | yes |
+OpenBSD 4.8 | yes | yes |
------------------+--------------------+---------------------+
-Ubuntu 9.04 | yes | yes |
+Ubuntu 10.10 | yes | yes |
------------------+--------------------+---------------------+
-Mac OS X 10.3.9 | yes | yes |
+Debian 6.0 | yes | yes |
------------------+--------------------+---------------------+
* there was a period in time that NetBSD didn't compile
blob - /dev/null
blob + ef25bf5cc5c62d0e4851505ee72250a8abb13b5a (mode 644)
--- /dev/null
+++ Makefile.netbsd
@@ -0,0 +1,18 @@
+PROG=wildcarddnsd
+
+SRCS=main.c parse.c reply.c additional.c region.c wildcard.c recurse.c res_random.c bsd-arc4random.c
+
+#CFLAGS= -DDEBUG -g -Wall
+CFLAGS= -Wall -g
+LDFLAGS= -Wall -g
+LDADD= -lcrypto -lssl
+
+OBJDIR=.
+BINDIR=/usr/local/sbin
+
+MAN= wildcarddnsd.8
+
+#afterinstall:
+# @freebsd/install.sh
+
+.include <bsd.prog.mk>
blob - 6f9d389c0180dd639a46ba524f3c28823e1dcc66
blob + 22d8995247a9b4910c374d54c0f2d421b50acaf4
--- configure
+++ configure
@@ -6,6 +6,12 @@ function bsd {
}
+function netbsd {
+ echo configuring for NetBSD
+ cp Makefile.netbsd Makefile
+
+}
+
function freebsd {
echo configuring for FreeBSD
@@ -43,7 +49,7 @@ FreeBSD)
freebsd
;;
NetBSD)
- bsd;
+ netbsd;
;;
DragonflyBSD)
bsd;
blob - 7f9ab3f81db8c4c3f9cdf86f32a6208f1c9f7081
blob + 046192e43f483372fe049a86f6400bf67476ee58
--- recurse.c
+++ recurse.c
@@ -90,7 +90,7 @@ struct recurseentry {
} *rn1, *rn2, *rnp;
-static const char rcsid[] = "$Id: recurse.c,v 1.35 2011/04/12 10:45:49 pbug Exp $";
+static const char rcsid[] = "$Id: recurse.c,v 1.36 2011/04/19 16:33:46 pbug Exp $";
/*
* INIT_RECURSE - initialize the recurse singly linked list
@@ -654,7 +654,7 @@ again:
* record which record we used
*/
- sr->lookrecord = p;
+ sr->lookrecord = (u_char *)p;
memcpy((char *)&mydomain, (char *)data.data, sizeof(struct domain));
sd = (struct domain *)&mydomain;
@@ -1458,7 +1458,7 @@ again:
} else if (ntohs(a->type) == DNS_TYPE_NS) {
update = 1;
for (j = 0; j < sdomain.ns_count; j++) {
- if (memcasecmp(sdomain.ns[j]->nsserver, converted_name[i], MIN(cn_len[i], sdomain.ns[j]->nslen)) == 0) {
+ if (memcasecmp((u_char *)sdomain.ns[j]->nsserver, (u_char *)converted_name[i], MIN(cn_len[i], sdomain.ns[j]->nslen)) == 0) {
#if 0
syslog(LOG_INFO, "record exists already");
#endif
@@ -1509,7 +1509,7 @@ again:
} else if (ntohs(a->type) == DNS_TYPE_MX) {
update = 1;
for (j = 0; j < sdomain.mx_count; j++) {
- if (memcasecmp(sdomain.mx[j]->exchange, converted_name[i], MIN(cn_len[i], sdomain.mx[j]->exchangelen)) == 0) {
+ if (memcasecmp((u_char *)sdomain.mx[j]->exchange, (u_char *)converted_name[i], MIN(cn_len[i], sdomain.mx[j]->exchangelen)) == 0) {
update = 0;
}
}
@@ -2139,7 +2139,7 @@ contains(u_char *a, u_char *b)
q = b;
while (*q) {
- if ((plen == qlen) && memcasecmp(p, q, qlen) == 0)
+ if ((plen == qlen) && memcasecmp((u_char *)p, (u_char *)q, qlen) == 0)
return (1);
qlen -= ((*q) + 1);
blob - 3c789057b02e47e295542766b68cef2c85b8fc2e
blob + 436cf058899586b567d4521c4ecc8a9c660692b5
--- res_random.c
+++ res_random.c
@@ -111,6 +111,9 @@ static long ru_reseed;
static u_int16_t pmod(u_int16_t, u_int16_t, u_int16_t);
static void res_initid(void);
+extern u_int32_t arc4random_uniform(u_int32_t upper_bound);
+extern void arc4random_buf(void *_buf, size_t n);
+
/*
* Do a fast modular exponation, returned value will be in the range
repomaster@centroid.eu