Commit Diff
Diff:
8553d61fccf35aa43801fb235c3bfaa51c4416a8
555f9cdc93c07d728d0b5037494a0d7e513d4add
555f9cdc93c07d728d0b5037494a0d7e513d4add
Commit:
555f9cdc93c07d728d0b5037494a0d7e513d4add
Tree:
1d7c8a9a99462b68089ed7e7d88f52fbbf0dd41e
Committer:
pjp <pjp@delphinusdns.org>
Date:
Thu Jun 6 14:56:08 2019
UTC
Message:
each .c file has now it's own #include instead of including ddd-include.h
which is moved to the attic.
--- additional.c
+++ additional.c
@@ -27,10 +27,36 @@
*/
/*
- * $Id: additional.c,v 1.26 2019/03/01 05:36:50 pjp Exp $
+ * $Id: additional.c,v 1.27 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- axfr.c
+++ axfr.c
@@ -27,10 +27,47 @@
*/
/*
- * $Id: axfr.c,v 1.26 2019/04/25 05:54:09 pjp Exp $
+ * $Id: axfr.c,v 1.27 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#ifdef __FreeBSD__
+#include "imsg.h"
+#else
+#include <imsg.h>
+#endif /* __FreeBSD__ */
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- db.c
+++ db.c
@@ -27,10 +27,38 @@
*/
/*
- * $Id: db.c,v 1.12 2019/04/25 05:54:09 pjp Exp $
+ * $Id: db.c,v 1.13 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- ddd-include.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2005-2019 Peter J. Philipp
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * $Id: ddd-include.h,v 1.10 2019/04/25 05:54:09 pjp Exp $
- */
-
-#ifndef _INCLUDES_H
-#define _INCLUDES_H
-
-#include <sys/param.h>
-#include <sys/ipc.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <sys/queue.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/un.h>
-
-#include <net/if.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/udp.h>
-#define _KERNEL 1
-#include <netinet/ip6.h>
-#undef _KERNEL
-
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <pwd.h>
-#include <ifaddrs.h>
-#include <dirent.h>
-#include <signal.h>
-#include <time.h>
-
-#ifdef __linux__
-#include <grp.h>
-#define __USE_BSD 1
-#include <endian.h>
-#include <bsd/stdlib.h>
-#include <bsd/string.h>
-#include <bsd/unistd.h>
-#include <bsd/sys/queue.h>
-#define __unused
-#include <bsd/sys/tree.h>
-#include <bsd/sys/endian.h>
-#include "imsg.h"
-#else
-#include <sys/queue.h>
-#include <sys/tree.h>
-#ifdef __FreeBSD__
-#include "imsg.h"
-#else
-#include <imsg.h>
-#endif
-#endif
-
-#ifndef NTOHS
-#include "endian.h"
-#endif
-
-#endif
--- dddctl.c
+++ dddctl.c
@@ -27,14 +27,61 @@
*/
/*
- * $Id: dddctl.c,v 1.62 2019/04/30 10:21:00 pjp Exp $
+ * $Id: dddctl.c,v 1.63 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
-#include "ddd-dns.h"
-#include "ddd-db.h"
-#include "ddd-config.h"
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <sys/wait.h>
+#include <sys/un.h>
+#include <net/if.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <syslog.h>
+#include <ctype.h>
+#include <pwd.h>
+#include <ifaddrs.h>
+#include <dirent.h>
+#include <signal.h>
+#include <time.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/unistd.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#include "imsg.h"
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#ifdef __FreeBSD__
+#include "imsg.h"
+#else
+#include <imsg.h>
+#endif /* __FreeBSD__ */
+#endif /* __linux__ */
+
#include <openssl/bn.h>
#include <openssl/obj_mac.h>
#include <openssl/rsa.h>
@@ -44,6 +91,9 @@
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#include "ddd-dns.h"
+#include "ddd-db.h"
+#include "ddd-config.h"
int debug = 0;
int verbose = 0;
--- delphinusdnsd.c
+++ delphinusdnsd.c
@@ -27,10 +27,64 @@
*/
/*
- * $Id: delphinusdnsd.c,v 1.61 2019/04/25 05:54:09 pjp Exp $
+ * $Id: delphinusdnsd.c,v 1.62 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <sys/queue.h>
+#include <sys/mman.h>
+#include <sys/wait.h>
+#include <sys/un.h>
+
+#include <net/if.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <syslog.h>
+#include <ctype.h>
+#include <pwd.h>
+#include <ifaddrs.h>
+#include <dirent.h>
+#include <signal.h>
+#include <time.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/unistd.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#include "imsg.h"
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#ifdef __FreeBSD__
+#include "imsg.h"
+#else
+#include <imsg.h>
+#endif /* __FreeBSD__ */
+#endif /* __linux__ */
+
#include "ddd-dns.h"
#include "ddd-db.h"
#include "ddd-config.h"
--- dnssec.c
+++ dnssec.c
@@ -27,10 +27,47 @@
*/
/*
- * $Id: dnssec.c,v 1.23 2019/02/26 07:45:56 pjp Exp $
+ * $Id: dnssec.c,v 1.24 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/select.h>
+#include <sys/wait.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <errno.h>
+#include <signal.h>
+#include <ctype.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#ifdef __FreeBSD__
+#include "imsg.h"
+#else
+#include <imsg.h>
+#endif /* __FreeBSD__ */
+#endif /* __linux__ */
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- ent.c
+++ ent.c
@@ -27,14 +27,42 @@
*/
/*
- * $Id: ent.c,v 1.9 2019/02/19 11:49:54 pjp Exp $
+ * $Id: ent.c,v 1.10 2019/06/06 14:56:08 pjp Exp $
*/
/*
* this file is based on whitelist.c
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- filter.c
+++ filter.c
@@ -27,10 +27,39 @@
*/
/*
- * $Id: filter.c,v 1.5 2018/10/19 08:24:48 pjp Exp $
+ * $Id: filter.c,v 1.6 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- log.c
+++ log.c
@@ -27,16 +27,43 @@
*/
/*
- * $Id: log.c,v 1.5 2018/10/19 08:24:48 pjp Exp $
+ * $Id: log.c,v 1.6 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
-#include "ddd-dns.h"
-#include "ddd-db.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <syslog.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
#include <openssl/evp.h>
#include <openssl/hmac.h>
+
+#include "ddd-dns.h"
+#include "ddd-db.h"
extern struct logging logging;
extern int debug;
--- parse.y
+++ parse.y
@@ -21,11 +21,49 @@
*/
/*
- * $Id: parse.y,v 1.67 2019/04/30 10:21:00 pjp Exp $
+ * $Id: parse.y,v 1.68 2019/06/06 14:56:08 pjp Exp $
*/
%{
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <syslog.h>
+#include <ctype.h>
+#include <signal.h>
+#include <time.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/unistd.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- ratelimit.c
+++ ratelimit.c
@@ -27,10 +27,39 @@
*/
/*
- * $Id: ratelimit.c,v 1.6 2019/02/28 05:03:34 pjp Exp $
+ * $Id: ratelimit.c,v 1.7 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/mman.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <time.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- raxfr.c
+++ raxfr.c
@@ -26,10 +26,38 @@
*
*/
/*
- * $Id: raxfr.c,v 1.12 2019/04/30 10:21:00 pjp Exp $
+ * $Id: raxfr.c,v 1.13 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- region.c
+++ region.c
@@ -27,10 +27,37 @@
*/
/*
- * $Id: region.c,v 1.6 2018/10/19 08:24:48 pjp Exp $
+ * $Id: region.c,v 1.7 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- reply.c
+++ reply.c
@@ -27,16 +27,43 @@
*/
/*
- * $Id: reply.c,v 1.78 2019/04/30 10:57:59 pjp Exp $
+ * $Id: reply.c,v 1.79 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
-#include "ddd-dns.h"
-#include "ddd-db.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#include "ddd-dns.h"
+#include "ddd-db.h"
/* prototypes */
--- tsig.c
+++ tsig.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: tsig.c,v 1.1 2019/02/24 07:14:02 pjp Exp $
+ * $Id: tsig.c,v 1.2 2019/06/06 14:56:08 pjp Exp $
*/
@@ -35,7 +35,32 @@
* this file is based on filter.c
*/
-#include "ddd-include.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
#include "ddd-dns.h"
#include "ddd-db.h"
--- util.c
+++ util.c
@@ -27,19 +27,57 @@
*/
/*
- * $Id: util.c,v 1.30 2019/04/25 05:54:09 pjp Exp $
+ * $Id: util.c,v 1.31 2019/06/06 14:56:08 pjp Exp $
*/
-#include "ddd-include.h"
-#include "ddd-dns.h"
-#include "ddd-db.h"
-#include "ddd-config.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <string.h>
+#include <errno.h>
+#include <syslog.h>
+#include <unistd.h>
+#include <ctype.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/unistd.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#include "imsg.h"
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#ifdef __FreeBSD__
+#include "imsg.h"
+#else
+#include <imsg.h>
+#endif /* __FreeBSD__ */
+#endif /* __linux__ */
+
+
#include <openssl/evp.h>
#include <openssl/hmac.h>
-/* prototypes */
+#include "ddd-dns.h"
+#include "ddd-db.h"
+#include "ddd-config.h"
+/* prototypes */
int label_count(char *);
char * dns_label(char *, int *);
--- whitelist.c
+++ whitelist.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: whitelist.c,v 1.5 2018/10/19 08:24:48 pjp Exp $
+ * $Id: whitelist.c,v 1.6 2019/06/06 14:56:08 pjp Exp $
*/
@@ -35,7 +35,34 @@
* this file is based on filter.c
*/
-#include "ddd-include.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __linux__
+#include <grp.h>
+#define __USE_BSD 1
+#include <endian.h>
+#include <bsd/stdlib.h>
+#include <bsd/string.h>
+#include <bsd/sys/queue.h>
+#define __unused
+#include <bsd/sys/tree.h>
+#include <bsd/sys/endian.h>
+#else /* not linux */
+#include <sys/queue.h>
+#include <sys/tree.h>
+#endif /* __linux__ */
+
+
#include "ddd-dns.h"
#include "ddd-db.h"