1
0
mirror of https://github.com/gophernicus/gophernicus.git synced 2024-06-23 06:35:34 +00:00

Fix compiling for MacOS X Yosemite

This commit is contained in:
Kim Holviala 2014-11-10 11:15:55 +02:00
parent 6d422e67b5
commit 84199e80fb
2 changed files with 15 additions and 2 deletions

View File

@ -88,7 +88,10 @@ headers: $(HEADERS)
functions.h:
echo "/* Automatically generated function definitions */" > $@
echo >> $@
grep -h "^[a-z]" $(SOURCES) | grep -v "int main" | sed -e "s/ =.*$$//" -e "s/ *$$/;/" >> $@
grep -h "^[a-z]" $(SOURCES) | \
grep -v "int main" | \
grep -v "strlc" | \
sed -e "s/ =.*$$//" -e "s/ *$$/;/" >> $@
@echo
bin2c: bin2c.c

View File

@ -58,7 +58,6 @@
/* Embedded Linux with uClibc */
#ifdef __UCLIBC__
lskdjf
#undef HAVE_SHMEM
#undef HAVE_PASSWD
#endif
@ -74,6 +73,13 @@ lskdjf
#define HAVE_STRLCPY
#endif
/* MacOS */
#if defined(__APPLE__)
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10
#define HAVE_STRLCPY
#endif
#endif
/* Add other OS-specific defines here */
/*
@ -119,6 +125,10 @@ lskdjf
#include <sys/utsname.h>
#endif
#if !defined(HAVE_STRLCPY)
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
#endif
/*
* Compile-time configuration