forked from mirrors/tftp-hpa-google
printf() and htonl() type matching issue
On older systems, htonl() returns unsigned long, on newer systems it returns uint32_t. Cast to unsigned long and use %08lX for the format, that seems to be the easiest solution.
This commit is contained in:
parent
ab12c128ff
commit
982c1f2697
1 changed files with 1 additions and 2 deletions
|
@ -1046,8 +1046,7 @@ rewrite_macros(char macro, char *output)
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
if ( output )
|
if ( output )
|
||||||
sprintf(output, "%08X",
|
sprintf(output, "%08lX", (unsigned long)ntohl(from.sin_addr.s_addr));
|
||||||
ntohl(from.sin_addr.s_addr));
|
|
||||||
return 8;
|
return 8;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue