diff options
Diffstat (limited to 'contrib/ldns/compat/b32_pton.c')
-rw-r--r-- | contrib/ldns/compat/b32_pton.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/ldns/compat/b32_pton.c b/contrib/ldns/compat/b32_pton.c index 9c261e6..28accb8 100644 --- a/contrib/ldns/compat/b32_pton.c +++ b/contrib/ldns/compat/b32_pton.c @@ -40,6 +40,7 @@ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include <ldns/config.h> +#ifndef HAVE_B32_PTON #include <sys/types.h> #include <sys/param.h> @@ -59,6 +60,8 @@ #include <stdlib.h> #include <string.h> +#include <ldns/util.h> + /* "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";*/ static const char Base32[] = "abcdefghijklmnopqrstuvwxyz234567"; @@ -174,7 +177,7 @@ static const char Pad32 = '='; it returns the number of data bytes stored at the target, or -1 on error. */ -int +static int ldns_b32_pton_ar(char const *src, size_t hashed_owner_str_len, uint8_t *target, size_t targsize, const char B32_ar[]) { int tarindex, state, ch; @@ -385,3 +388,5 @@ b32_pton_extended_hex(char const *src, size_t hashed_owner_str_len, uint8_t *tar { return ldns_b32_pton_ar(src, hashed_owner_str_len, target, targsize, Base32_extended_hex); } + +#endif /* !HAVE_B32_PTON */ |