Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion postlicyd/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static int dns_handler(client_t *event, void *config)
}

bool dns_resolve(const char *hostname, dns_rrtype_t type,
ub_callback_t callback, void *data)
ub_callback_type callback, void *data)
{
if (_G.ctx == NULL) {
_G.ctx = ub_ctx_create();
Expand Down
2 changes: 1 addition & 1 deletion postlicyd/dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ typedef void (*dns_result_callback_f)(dns_result_t *result, void *data);
*/
__attribute__((nonnull(1,3,4)))
bool dns_resolve(const char *hostname, dns_rrtype_t type,
ub_callback_t callback, void *data);
ub_callback_type callback, void *data);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should provide a compatibility layer with the older versions of the lib in some way. For example:

#define UNBOUND_FULL_VERSION  \
    ((UNBOUND_VERSION_MAJOR << 16) \
    | (UNBOUND_VERSION_MINOR << 8) \
    | (UNBOUND_VERSION_MICRO))

#if UNBOUND_FULL_VERSION < 0x010601
typedef ub_callback_t ub_callback_type;
#endif


/** Fetch the DNS record of the given type.
*/
Expand Down
2 changes: 1 addition & 1 deletion postlicyd/spf-proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static bool spf_validate_domain(const char* restrict domain)
}

static bool spf_query(spf_t *spf, const char* query, dns_rrtype_t rtype,
ub_callback_t cb)
ub_callback_type cb)
{
buffer_reset(&_G.query_buffer);
buffer_addstr(&_G.query_buffer, query);
Expand Down