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

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

libgit2: update to version 0.24.1, ABI compatible with previous version.

File size: 574 bytes
  • src/posix.h

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