LIBUNBOUND_OBJ=$(addprefix $(BUILD),$(LIBUNBOUND_SRC:.c=.o)) $(COMPAT_OBJ)
ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \
$(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) $(SIGNIT_SRC) \
- $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC)
+ $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC)
ALL_OBJ=$(addprefix $(BUILD),$(ALL_SRC:.c=.o) \
$(addprefix compat/,$(LIBOBJS))) $(COMPAT_OBJ)
- updated ldns-src.tar.gz with ldns-trunk today (1.2.2 fixes).
- size_t to int for portability of the header file.
- fixup bogus handling.
+ - dependencies and lint for unbound-host.
6 December 2007: Wouter
- library resolution works in foreground mode, unbound-host app
exit(1);
}
-/** determine if str is ip4 */
+/** determine if str is ip4 and put into reverse lookup format */
static int
isip4(const char* nm, char** res)
{
return 0;
}
snprintf(buf, sizeof(buf), "%u.%u.%u.%u.in-addr.arpa",
- ((uint8_t*)&addr)[3], ((uint8_t*)&addr)[2],
- ((uint8_t*)&addr)[1], ((uint8_t*)&addr)[0]);
+ (unsigned)((uint8_t*)&addr)[3], (unsigned)((uint8_t*)&addr)[2],
+ (unsigned)((uint8_t*)&addr)[1], (unsigned)((uint8_t*)&addr)[0]);
*res = strdup(buf);
return 1;
}
-/** determine if str is ip6 */
+/** determine if str is ip6 and put into reverse lookup format */
static int
isip6(const char* nm, char** res)
{
}
snprintf(buf+16*4, sizeof(buf)-16*4, "ip6.arpa");
*res = strdup(buf);
+ if(!*res) {
+ fprintf(stderr, "error: out of memory\n");
+ exit(1);
+ }
return 1;
}
static void
pretty_type(char* s, size_t len, int t)
{
- const ldns_rr_descriptor *d = ldns_rr_descript(t);
+ const ldns_rr_descriptor *d = ldns_rr_descript((uint16_t)t);
if(d) {
snprintf(s, len, "%s", d->_name);
} else {