git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added preload_usb hack
[tridge/junkcode.git]
/
ntoa.c
1
#include <stdio.h>
2
#include <sys/types.h>
3
#include <netinet/in.h>
4
#include <arpa/inet.h>
5
6
7
main()
8
{
9
struct in_addr ip;
10
11
ip.s_addr = 0x12345678;
12
13
if (strcmp(inet_ntoa(ip),"18.52.86.120") != 0 &&
14
strcmp(inet_ntoa(ip),"120.86.52.18") != 0) {
15
fprintf(stderr,"broken inet_ntoa\n");
16
exit(0);
17
}
18
19
/* not a broken inet_ntoa */
20
exit(1);
21
}