> Date: Thu, 27 Jul 2017 19:50:26 +0000 > From: Florian Obser <flor...@openbsd.org> > > ... to silence clang warnings, it kinda has a point... > > e.g.: > > /usr/src/usr.sbin/nsd/zonec.c:642:6: warning: implicit declaration of > function > '__b64_pton' is invalid in C99 [-Wimplicit-function-declaration] > i = __b64_pton(b64, buffer, B64BUFSIZE); > > /usr/src/usr.sbin/nsd/rdata.c:402:11: warning: implicit declaration of > function > '__b64_ntop' is invalid in C99 [-Wimplicit-function-declaration] > length = __b64_ntop(rdata_atom_data(rdata), size, > > I figured config.h.in is as good as any for a local diff we are going > to carry. > > OK?
Given that that configure,ac says: # # Check for b64_ntop (and assume result applies to b64_pton as well). # The functions are actually prefixed with __ and resolv.h defines # macros for the unprefixed versions, however including this header # causes conflicts with our T_xx defines. # I'd say this is the right approach. ok kettenis@ Probably something to push upstream. It'll probably warrant some wrapping in an #ifdef in that case. > diff --git usr.sbin/nsd/config.h.in usr.sbin/nsd/config.h.in > index 8a3f47fe877..6c44616432f 100644 > --- usr.sbin/nsd/config.h.in > +++ usr.sbin/nsd/config.h.in > @@ -817,3 +817,5 @@ int memcmp(const void *x, const void *y, size_t n); > #endif /* !HAVE_STRUCT_TIMESPEC */ > #endif /* !CONFIG_DEFINES */ > > +int __b64_ntop(uint8_t const *, size_t, char *, size_t); > +int __b64_pton(char const *, uint8_t*, size_t); > > -- > I'm not entirely sure you are real. > >