Ticket #10325: 0001-Only-declare-strl-cpy-cat-if-they-aren-t-defines.patch

File 0001-Only-declare-strl-cpy-cat-if-they-aren-t-defines.patch, 1.0 KB (added by js, 7 years ago)
  • headers/build/BeOSBuildCompatibility.h

    From 3ba1e4aa0827fdb05bd4cb38ff90f64ba67e8927 Mon Sep 17 00:00:00 2001
    From: Jonathan Schleifer <js@webkeks.org>
    Date: Tue, 17 Dec 2013 17:48:03 +0100
    Subject: [PATCH 1/6] Only declare strl{cpy,cat} if they aren't defines.
    
    On some system (e.g. OS X Mavericks), those are defines to compiler
    built-ins, thus trying to declare them will fail.
    ---
     headers/build/BeOSBuildCompatibility.h | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/headers/build/BeOSBuildCompatibility.h b/headers/build/BeOSBuildCompatibility.h
    index 875897c..95c00d0 100644
    a b extern "C" {  
    4444#endif
    4545
    4646// Is kernel-only under Linux.
     47#ifndef strlcpy
    4748extern size_t   strlcpy(char* dest, const char* source, size_t length);
     49#endif
     50#ifndef strlcat
    4851extern size_t   strlcat(char* dest, const char* source, size_t length);
     52#endif
    4953
    5054#if defined(HAIKU_HOST_PLATFORM_FREEBSD) || defined(HAIKU_HOST_PLATFORM_DARWIN)
    5155extern size_t   strnlen(const char* string, size_t length);