This patch enables using libfdt's strlen() implementation. diff --git i/libfdt/libfdt_env.h w/libfdt/libfdt_env.h index 73b6d40..3a2d38c 100644 --- i/libfdt/libfdt_env.h +++ w/libfdt/libfdt_env.h @@ -66,13 +66,6 @@ static inline fdt64_t cpu_to_fdt64(uint64_t x) #undef CPU_TO_FDT16 #undef EXTRACT_BYTE -#ifdef __APPLE__ -#include - -/* strnlen() is not available on Mac OS < 10.7 */ -# if !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MAX_ALLOWED < \ - MAC_OS_X_VERSION_10_7) - #define strnlen fdt_strnlen /* @@ -88,9 +81,4 @@ static inline size_t fdt_strnlen(const char *string, size_t max_count) return p ? p - string : max_count; } -#endif /* !defined(MAC_OS_X_VERSION_10_7) || (MAC_OS_X_VERSION_MAX_ALLOWED < - MAC_OS_X_VERSION_10_7) */ - -#endif /* __APPLE__ */ - #endif /* LIBFDT_ENV_H */