From: Guido Draheim Date: Thu, 1 Mar 2018 00:18:43 +0000 (+0100) Subject: edit last patch - move stdlib to ifdef-section, and make the internal function static #25 X-Git-Tag: v0.13.69~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e78b8d3077ce16e5433020f6098b5120c27ae3e9;p=zziplib edit last patch - move stdlib to ifdef-section, and make the internal function static #25 --- diff --git a/zzip/__string.h b/zzip/__string.h index d65c022..cd56714 100644 --- a/zzip/__string.h +++ b/zzip/__string.h @@ -1,8 +1,6 @@ #ifndef __ZZIP_INTERNAL_STRING_H #define __ZZIP_INTERNAL_STRING_H -#include - #ifdef __linux__ #define _GNU_SOURCE _glibc_developers_are_idiots_to_call_strndup_gnu_specific_ #endif @@ -18,9 +16,10 @@ #if defined ZZIP_HAVE_STRNLEN || defined strnlen #define _zzip_strnlen strnlen #else +#include /* if your system does not have strnlen: */ -zzip__new__ size_t +zzip__new__ static size_t _zzip_strnlen(const char *p, size_t maxlen) { const char * stop = (char *)memchr(p, '\0', maxlen);