Commit 2ef4a5d2 authored by Karel Slaný's avatar Karel Slaný

Updated Unbound and made it compile using mingw-w64.

parent 3b399a0e
......@@ -17,7 +17,7 @@ DOWNLOADER = curl -O
PKG_OPENSSL = openssl-1.0.2h
PKG_LDNS = ldns-1.6.17
# unbound-1.4.22 unbound-1.5.9
PKG_UNBOUND = unbound-1.4.22
PKG_UNBOUND = unbound-1.5.9
ARCHIVE_OPENSSL = $(PKG_OPENSSL).tar.gz
ARCHIVE_LDNS = $(PKG_LDNS).tar.gz
......@@ -74,14 +74,30 @@ srcs-ldns-64-stamp: libs-srcs-64-stamp
cd libs-srcs-64; tar -xzf ../libs-archives/$(ARCHIVE_LDNS); mv ldns-* ldns; cd ..
touch $@
if MINGW_BUILD
PATCH_UNBOUND_CMD_32 = \
(cd libs-srcs-32/unbound && \
$(INSTALL) -m 644 ../../files/unbound-1.5.9-mingw-w64-compat.patch ./unbound-1.5.9-mingw-w64-compat.patch && \
$(INSTALL) -m 644 ../../files/unbound-mingw-w64-compat.h ./unbound-mingw-w64-compat.h && \
patch -p1 < ./unbound-1.5.9-mingw-w64-compat.patch)
PATCH_UNBOUND_CMD_64 = \
(cd libs-srcs-64/unbound && \
$(INSTALL) -m 644 ../../files/unbound-1.5.9-mingw-w64-compat.patch ./unbound-1.5.9-mingw-w64-compat.patch && \
$(INSTALL) -m 644 ../../files/unbound-mingw-w64-compat.h ./unbound-mingw-w64-compat.h && \
patch -p1 < ./unbound-1.5.9-mingw-w64-compat.patch)
endif
srcs-unbound-32-stamp: libs-srcs-32-stamp
-rm -rf libs-srcs-32/unbound*
cd libs-srcs-32; tar -xzf ../libs-archives/$(ARCHIVE_UNBOUND); mv unbound-* unbound; cd ..
$(PATCH_UNBOUND_CMD_32)
touch $@
srcs-unbound-64-stamp: libs-srcs-64-stamp
-rm -rf libs-srcs-64/unbound*
cd libs-srcs-64; tar -xzf ../libs-archives/$(ARCHIVE_UNBOUND); mv unbound-* unbound; cd ..
$(PATCH_UNBOUND_CMD_64)
touch $@
libs-built-32-stamp:
......
--- 001/util/locks.c 2015-11-18 15:11:46.000000000 +0100
+++ 002/util/locks.c 2016-08-22 11:42:57.000000000 +0200
@@ -42,6 +42,7 @@
#include "config.h"
#include "util/locks.h"
#include <signal.h>
+#include "unbound-mingw-w64-compat.h"
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <sys/types.h>
#ifdef _WIN64
//__MINGW_EXTENSION
typedef unsigned long long _sigset_t;
#else
typedef unsigned long _sigset_t;
#endif
typedef _sigset_t sigset_t;
#ifndef sigemptyset
# define sigemptyset(pset) (*(pset) = 0)
#endif
#ifndef sigfillset
# define sigfillset(pset) (*(pset) = (_sigset_t)-1)
#endif
#ifndef sigaddset
# define sigaddset(pset, num) (*(pset) |= (1L<<(num)))
#endif
#ifndef sigdelset
# define sigdelset(pset, num) (*(pset) &= ~(1L<<(num)))
#endif
#ifndef sigismember
# define sigismember(pset, num) (*(pset) & (1L<<(num)))
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment