Skip to content

Conversation

@cpages
Copy link

@cpages cpages commented Mar 3, 2017

From their changelog: Fix to rename ub_callback_t to ub_callback_type, because POSIX reserves _t typedefs

From their changelog: Fix to rename ub_callback_t to ub_callback_type, because POSIX reserves _t typedefs
Copy link
Owner

@Fruneau Fruneau left a comment

Choose a reason for hiding this comment

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

Hi,

Thanks for the patch. I just have a single issue with compilation breakage with earlier versions of unbound.

__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

jerith666 added a commit to jerith666/nixpkgs that referenced this pull request Mar 11, 2017
this is a stop-gap, applying the work-in-progress patch from
Fruneau/pfixtools#21, while we await its
acceptance upstream.
@Fruneau
Copy link
Owner

Fruneau commented Apr 29, 2017

Hi @cpages, could you update the PR?

@cpages
Copy link
Author

cpages commented May 12, 2017

I'm sorry but I don't really have the time to fix and test this properly right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants