mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@120993 d073be05-634f-4543-b044-5fe20cf6d1d6
20 lines
673 B
Diff
20 lines
673 B
Diff
--- gethostname.c.orig 2014-05-29 13:20:06.000000000 -0400
|
|
+++ gethostname.c 2014-05-29 13:19:42.000000000 -0400
|
|
@@ -18,7 +18,16 @@
|
|
#include <arpa/inet.h>
|
|
#include <string.h>
|
|
|
|
+#ifndef strlcpy
|
|
+/*
|
|
+ * On OS X (and probably some other systems aswell), strlcpy might be
|
|
+ * implemented as a macro. If this macro is defined while we're including this
|
|
+ * header, strlcpy is already declared and trying to re-declare it with the
|
|
+ * following line *will* fail, because the macro will expand to something
|
|
+ * that's not a valid function name.
|
|
+ */
|
|
size_t strlcpy(char *dst, const char *src, size_t siz);
|
|
+#endif /* !defined(strlcpy) */
|
|
|
|
char *get_hostname(char* addr)
|
|
{
|