summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-02-04 16:57:25 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-02-04 18:09:30 +0000
commitb98d22c19151de486fcd23ea701456395dae776e (patch)
tree5a651b6df44be11460a340b0220535b9b088698d
parent160f6507c39b3a25439648194baa6158d338a2e4 (diff)
downloaddnsmasq-b98d22c19151de486fcd23ea701456395dae776e.tar.gz
Linking stuff. Latest Debian/Ubuntu don't automatically link gmp.
-rw-r--r--Makefile5
-rwxr-xr-xbld/pkg-wrapper29
-rw-r--r--src/dnssec.c4
3 files changed, 22 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index a298425..292c8bd 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@ lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CON
lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1`
nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed`
nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed`
+gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp`
sunos_libs = `if uname | grep SunOS >/dev/null 2>&1; then echo -lsocket -lnsl -lposix4; fi`
version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
@@ -77,7 +78,7 @@ all : $(BUILDDIR)
@cd $(BUILDDIR) && $(MAKE) \
top="$(top)" \
build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
- build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs)" \
+ build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
-f $(top)/Makefile dnsmasq
mostly_clean :
@@ -101,7 +102,7 @@ all-i18n : $(BUILDDIR)
top="$(top)" \
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \
- build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) `$(PKG_CONFIG) --libs libidn`" \
+ build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) `$(PKG_CONFIG) --libs libidn`" \
-f $(top)/Makefile dnsmasq
for f in `cd $(PO); echo *.po`; do \
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
diff --git a/bld/pkg-wrapper b/bld/pkg-wrapper
index 37c33a2..efb848a 100755
--- a/bld/pkg-wrapper
+++ b/bld/pkg-wrapper
@@ -9,19 +9,24 @@ shift
in=`cat`
-if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
- echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
- if [ $op = "--libs" ]; then
- pkg=`$pkg --static $op $*`
- echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
- exit 0
- fi
-fi
-
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
echo $in | grep $search >/dev/null 2>&1; then
- pkg=`$pkg $op $*`
- echo "$pkg"
-
+
+ if [ $op = "--copy" ]; then
+ pkg="$*"
+ else
+ pkg=`$pkg $op $*`
+ fi
+
+ if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
+ echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
+ if [ $op = "--libs" ] || [ $op = "--copy" ]; then
+ echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
+ else
+ echo "$pkg"
+ fi
+ else
+ echo "$pkg"
+ fi
fi
diff --git a/src/dnssec.c b/src/dnssec.c
index 00486db..ff14a80 100644
--- a/src/dnssec.c
+++ b/src/dnssec.c
@@ -505,7 +505,7 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in
j != 0; j--)
{
unsigned char *pstart, *pdata;
- int stype, sclass, ttl;
+ int stype, sclass;
pstart = p;
@@ -514,7 +514,7 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in
GETSHORT(stype, p);
GETSHORT(sclass, p);
- GETLONG(ttl, p);
+ p += 4; /* TTL */
pdata = p;