source: trunk/dports/devel/libgit2/files/patch-strnlen-posix.h.diff @ 140951

Last change on this file since 140951 was 140951, checked in by devans@…, 4 years ago

libgit2: update to version 0.23.3.

File size: 574 bytes
  • src/posix.h

    old new  
    121121
    122122#include "strnlen.h"
    123123
     124#ifdef __APPLE__
     125#include <Availability.h>
     126#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
     127static size_t
     128strnlen (const char *string, size_t maxlen)
     129{
     130    const char *end = memchr (string, '\0', maxlen);
     131    return end ? (size_t) (end - string) : maxlen;
     132}
     133# define p_strnlen strnlen
     134#endif
     135#endif
     136
    124137#ifdef NO_READDIR_R
    125138GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
    126139{
Note: See TracBrowser for help on using the repository browser.