Don't use included strlcpy/strlcat when already defined as macros

OS X 10.9 with Fortify has conflicting prototypes:

In file included from calmwm.c:36:
./calmwm.h:28:8: error: conflicting types for '__builtin___strlcat_chk' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/secure/_string.h:111:3:
note:
      expanded from macro 'strlcat'
  __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
This commit is contained in:
Christian Neukirchen
2014-06-22 22:50:03 +02:00
parent a483e23e94
commit c7f481e6fa
3 changed files with 20 additions and 5 deletions

View File

@@ -18,10 +18,11 @@
/* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */
#ifndef HAVE_STRLCPY
#include <sys/types.h>
#include <string.h>
#include "calmwm.h"
#ifndef HAVE_STRLCPY
/*
* Copy src to string dst of size siz. At most siz-1 characters