Роман Донченко
2008-Oct-20 21:02 UTC
[syslinux] [PATCH] 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. By the way, I see that 'configure' tests for <winsock.h> and <winsock2.h>, but Winsock isn't actually used. What's the reason? diff --git a/config.h b/config.h index bd1dac1..76c7514 100644 --- a/config.h +++ b/config.h @@ -325,6 +325,11 @@ const char *gai_strerror(int); #define AI_CANONNAME 0x0002 /* Request for canonical name. */ #endif +#ifndef AI_ADDRCONFIG +#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose + returned address type.. */ +#endif + #ifndef EAI_NONAME #define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ #endif @@ -335,15 +340,16 @@ const char *gai_strerror(int); #define EAI_MEMORY -10 /* Memory allocation failure. */ #endif #ifndef EAI_SYSTEM -#define EAI_SYSTEM -11 /* System error returned in rrno'. */ +#define EAI_SYSTEM -11 /* System error returned in `errno'. */ #endif #endif -#ifndef HAVE_INET_NTOP -const char *inet_ntop(int, const void *, char *, socklen_t); #ifndef INET6_ADDRSTRLEN -#define INET6_ADDRSTRLEN 48 +#define INET6_ADDRSTRLEN 46 #endif + +#ifndef HAVE_INET_NTOP +const char *inet_ntop(int, const void *, char *, socklen_t); #endif /* tftp-hpa version and configuration strings */
H. Peter Anvin
2008-Oct-20 22:04 UTC
[syslinux] [PATCH] Compilation of tftp-hpa's Git HEAD with no IPv6, and misc
????? ???????? wrote:> 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. > > By the way, I see that 'configure' tests for <winsock.h> and <winsock2.h>, > but Winsock isn't actually used. What's the reason? >Mostly I've been meaning to try to fix compilation under Winsock2 (I don't think there is any reason to make Winsock1 work at this point), but it just never has been enough of a priority to actually make it happen, especially since tftpd32 is a pretty good alternative for Windows-afflicted users. Thanks for the patch! -hpa
H. Peter Anvin
2008-Oct-20 22:09 UTC
[syslinux] [PATCH] Compilation of tftp-hpa's Git HEAD with no IPv6, and misc
????? ???????? wrote:> 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. > > By the way, I see that 'configure' tests for <winsock.h> and <winsock2.h>, > but Winsock isn't actually used. What's the reason?Thanks! I have applied this patch and pushed out tftp-hpa-0.49. -hpa