Commit Diff
Diff:
22a36b57eba0dca2cc3d68d113d98b6f1ec70553
05b37e84dc0e839d5a11a0f3da7b6828a347a8a7
Commit:
05b37e84dc0e839d5a11a0f3da7b6828a347a8a7
Tree:
dce26d1237931a0054f32ce1d59ded176734f3f4
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Sun May 18 12:02:08 2014 UTC
Message:
* this makes linux compile again (bad linux, bad bad bad)
blob - 98705ab5f0e285fc138408c2871002c87f53acde
blob + 679ea70bdf37858ebc5336e736a961a3516adf0b
--- axfr.c
+++ axfr.c
@@ -96,7 +96,7 @@ static struct notifyentry {
} *notn2, *notnp;
-static const char rcsid[] = "$Id: axfr.c,v 1.8 2014/05/17 09:18:11 pjp Exp $";
+static const char rcsid[] = "$Id: axfr.c,v 1.9 2014/05/18 12:02:08 pjp Exp $";
/*
* INIT_AXFR - initialize the axfr singly linked list
@@ -492,7 +492,11 @@ axfrloop(int *afd, int sockcount, char **ident, DB *db
sin = (struct sockaddr_in *)&from;
inet_ntop(AF_INET, (void*)&sin->sin_addr, (char*)&address, sizeof(address));
+#ifdef __linux__
+ SLIST_FOREACH(notnp, &notifyhead, notify_entry) {
+#else
SLIST_FOREACH_SAFE(notnp, &notifyhead, notify_entry, notn2) {
+#endif
for (i = 0; i < notify; i++) {
if (ntohs(dh->id) == notnp->ids[i] &&
@@ -502,7 +506,11 @@ axfrloop(int *afd, int sockcount, char **ident, DB *db
ntohs(question->hdr->qclass) == DNS_CLASS_IN &&
question->hdr->namelen == notnp->domainlen &&
memcmp(question->hdr->name, notnp->domain, notnp->domainlen) == 0) {
+#ifdef __linux__
+ SLIST_FOREACH(nfslnp, &notifyslavehead, notifyslave_entry) {
+#else
SLIST_FOREACH_SAFE(nfslnp, &notifyslavehead, notifyslave_entry, nfslnp2) {
+#endif
if (nfslnp->family != AF_INET)
continue;
@@ -565,8 +573,11 @@ axfrloop(int *afd, int sockcount, char **ident, DB *db
sin6 = (struct sockaddr_in6 *)&from;
inet_ntop(AF_INET6, (void*)&sin6->sin6_addr, (char*)&address, sizeof(address));
+#ifdef __linux
+ SLIST_FOREACH(notnp, &notifyhead, notify_entry) {
+#else
SLIST_FOREACH_SAFE(notnp, &notifyhead, notify_entry, notn2) {
-
+#endif
for (i = 0; i < notify; i++) {
if (ntohs(dh->id) == notnp->ids[i] &&
(ntohs(dh->query) & DNS_NOTIFY) &&
@@ -575,7 +586,11 @@ axfrloop(int *afd, int sockcount, char **ident, DB *db
ntohs(question->hdr->qclass) == DNS_CLASS_IN &&
question->hdr->namelen == notnp->domainlen &&
memcmp(question->hdr->name, notnp->domain, notnp->domainlen) == 0) {
+#ifdef __linux__
+ SLIST_FOREACH(nfslnp, &notifyslavehead, notifyslave_entry) {
+#else
SLIST_FOREACH_SAFE(nfslnp, &notifyslavehead, notifyslave_entry, nfslnp2) {
+#endif
if (nfslnp->family != AF_INET6)
continue;
@@ -1261,7 +1276,11 @@ notifyslaves(int *notifyfd)
dolog(LOG_INFO, "notifying %s...\n", nfslnp->name);
#endif
+#ifdef __linux__
+ SLIST_FOREACH(notnp, &notifyhead, notify_entry) {
+#else
SLIST_FOREACH_SAFE(notnp, &notifyhead, notify_entry, notn2) {
+#endif
notnp->ids[i] = arc4random() & 0xffff;
notnp->attempts[i]++;
if (notnp->attempts[i] > 10) {
repomaster@centroid.eu