From 9f8734ebea836decd58dbefc05af7380cac82439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 3 Feb 2006 12:24:15 +0000 Subject: [PATCH] FreeBSD doesn't have strnlen(), and therefore couldn't compile our strlcat.c. Sorry, that was the problem actually reported by Alexander Deynichenko... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16216 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/build/BeOSBuildCompatibility.h | 4 ++++ src/build/libroot/Jamfile | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/headers/build/BeOSBuildCompatibility.h b/headers/build/BeOSBuildCompatibility.h index 6a84253644..7dda8b56e2 100644 --- a/headers/build/BeOSBuildCompatibility.h +++ b/headers/build/BeOSBuildCompatibility.h @@ -16,6 +16,10 @@ extern "C" { extern size_t strlcpy(char *dest, const char *source, size_t length); extern size_t strlcat(char *dest, const char *source, size_t length); +#ifdef HAIKU_HOST_PLATFORM_FREEBSD +extern size_t strnlen(const char *string, size_t length); +#endif + // BeOS only extern ssize_t read_pos(int fd, off_t pos, void *buffer, size_t count); extern ssize_t write_pos(int fd, off_t pos, const void *buffer,size_t count); diff --git a/src/build/libroot/Jamfile b/src/build/libroot/Jamfile index addee044ca..f1df1e9b14 100644 --- a/src/build/libroot/Jamfile +++ b/src/build/libroot/Jamfile @@ -32,10 +32,11 @@ BuildPlatformSharedLibrary libroot_build.so : strlcpy.c strlcat.c + strnlen.c : $(HOST_LIBSTDC++) ; -SEARCH on [ FGristFiles strlcat.c strlcpy.c ] +SEARCH on [ FGristFiles strlcat.c strlcpy.c strnlen.c ] = [ FDirName $(HAIKU_TOP) src system libroot posix string ] ;