Compilation of tftp-hpa's Git HEAD with no IPv6, and misc

This patch does two things:
a) makes tftp-hpa to compile on systems with no IPv6 support (there were
some IPv6 macros used unconditionally);
b) removes a stray binary character, which was annoying.
This commit is contained in:
Роман Донченко 2008-10-21 01:02:00 +04:00 committed by H. Peter Anvin
parent a1dfd6baf8
commit ac5f0ab996

View file

@ -325,6 +325,11 @@ const char *gai_strerror(int);
#define AI_CANONNAME 0x0002 /* Request for canonical name. */ #define AI_CANONNAME 0x0002 /* Request for canonical name. */
#endif #endif
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
returned address type.. */
#endif
#ifndef EAI_NONAME #ifndef EAI_NONAME
#define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ #define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
#endif #endif
@ -335,15 +340,16 @@ const char *gai_strerror(int);
#define EAI_MEMORY -10 /* Memory allocation failure. */ #define EAI_MEMORY -10 /* Memory allocation failure. */
#endif #endif
#ifndef EAI_SYSTEM #ifndef EAI_SYSTEM
#define EAI_SYSTEM -11 /* System error returned in rrno'. */ #define EAI_SYSTEM -11 /* System error returned in `errno'. */
#endif #endif
#endif #endif
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif
#ifndef HAVE_INET_NTOP #ifndef HAVE_INET_NTOP
const char *inet_ntop(int, const void *, char *, socklen_t); const char *inet_ntop(int, const void *, char *, socklen_t);
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 48
#endif
#endif #endif
/* tftp-hpa version and configuration strings */ /* tftp-hpa version and configuration strings */