On Jun 09, 2013, Blair Zajac wrote: > Hello,
Hello Blair, > FYI, these warnings appear on Mac OS X 10.5, not including the BYTEORDER > caused warnings I mention in another thread: > > fko_hmac.c: In function 'fko_verify_hmac': > fko_hmac.c:75: warning: implicit declaration of function 'strndup' > fko_hmac.c:77: warning: assignment makes pointer from integer without a cast > fko_hmac.c:85: warning: assignment makes pointer from integer without a cast I wonder if the following patch would fix this? Damien noticed that on Windows systems strndup() wasn't there either, so he added an implementation of it to lib/fko_util.c. For any other systems where strndup() doesn't exist, this patch should allow the local implementation of it to apply I think: diff --git a/lib/fko_util.c b/lib/fko_util.c index de92365..d73ca77 100644 --- a/lib/fko_util.c +++ b/lib/fko_util.c @@ -399,7 +399,7 @@ strtol_wrapper(const char * const str, const int min, } -#ifdef WIN32 +#if defined(WIN32) || !defined(HAVE_STRNDUP) /* Windows does not have strndup, so we well implement it here. * This was the Public Domain C Library (PDCLib). */ diff --git a/lib/fko_util.h b/lib/fko_util.h index 35d2951..9c4d300 100644 --- a/lib/fko_util.h +++ b/lib/fko_util.h @@ -52,7 +52,7 @@ const char * msg_type_inttostr(const int type); size_t strlcat(char *dst, const char *src, size_t siz); size_t strlcpy(char *dst, const char *src, size_t siz); -#ifdef WIN32 +#if defined(WIN32) || !defined(HAVE_STRNDUP) char * strndup( const char * s, size_t len ); #endif > Blair ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Fwknop-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fwknop-discuss
