Ticket #44004: patch-gethostname.c.diff
File patch-gethostname.c.diff, 673 bytes (added by Gminfly, 10 years ago) |
---|
-
gethostname.c
old new 18 18 #include <arpa/inet.h> 19 19 #include <string.h> 20 20 21 #ifndef strlcpy 22 /* 23 * On OS X (and probably some other systems aswell), strlcpy might be 24 * implemented as a macro. If this macro is defined while we're including this 25 * header, strlcpy is already declared and trying to re-declare it with the 26 * following line *will* fail, because the macro will expand to something 27 * that's not a valid function name. 28 */ 21 29 size_t strlcpy(char *dst, const char *src, size_t siz); 30 #endif /* !defined(strlcpy) */ 22 31 23 32 char *get_hostname(char* addr) 24 33 {