summaryrefslogtreecommitdiff
path: root/net/tnftp
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2004-05-16 23:14:17 +0000
committerheinz <heinz@pkgsrc.org>2004-05-16 23:14:17 +0000
commitb3f13a649f07368b8900686a515698c9f04c0961 (patch)
tree32df7c45cf94ff08656a22a34ba2373d029d87b5 /net/tnftp
parent51d18c346e402e1d3db7ef6a639795a8d64cecf1 (diff)
downloadpkgsrc-b3f13a649f07368b8900686a515698c9f04c0961.tar.gz
Unixware 7.1.1 implements RFC 2133 (Basic Socket Interface Extensions for
IPv6) but not the successor RFC 2553. The configure script detects this and decides that tnftp needs to compile its own version of getaddrinfo(). This produces the error message /usr/include/netdb.h:248: `getaddrinfo' previously defined here because Unixware provides an implementation of getaddrinfo() in netdb.h instead of a prototype declaration :-/. Since netdb.h cannot be omitted, we will always get this definition and tnftp's version of getaddrinfo will always create a conflict. This ugly preprocessor hack works around the problem. Hints for a better solution welcome.
Diffstat (limited to 'net/tnftp')
-rw-r--r--net/tnftp/files/tnftp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/tnftp/files/tnftp.h b/net/tnftp/files/tnftp.h
index 162744a1ddf..712b06c94e1 100644
--- a/net/tnftp/files/tnftp.h
+++ b/net/tnftp/files/tnftp.h
@@ -1,4 +1,4 @@
-/* $Id: tnftp.h,v 1.2 2004/03/11 13:45:55 grant Exp $ */
+/* $Id: tnftp.h,v 1.3 2004/05/16 23:14:17 heinz Exp $ */
#define FTP_PRODUCT "tnftp"
#define FTP_VERSION "20030825"
@@ -23,7 +23,13 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
+#ifdef HAVE_RFC2553_NETDB
#include <netdb.h>
+#else
+#define getaddrinfo non_rfc2553_getaddrinfo
+#include <netdb.h>
+#undef getaddrinfo
+#endif
#include <pwd.h>
#include <setjmp.h>
#include <signal.h>