2010年(49)
分类: 嵌入式
2010-09-07 15:13:18
1 编译
修改makefile,其中对不同的系统如solaris、linux等等有不同配置,直接把linux的那些注释去掉就可以了。
# The following settings can be used under Linux. While adjtime is present,
# it is completely broken (i.e. it will work only if xntp is running), so it
# is a good idea to add -DADJTIME_MISSING.
CC = gcc -DADJTIME_MISSING
CFLAGS = -O
LDFLAGS =
LIBS = -lm
2 执行
域名 |
点分十进制IP |
十六进制IP |
ntp0.pipex.net(英国剑桥) |
158.43.50.229 |
0x9e2b8021 |
(1)./msntp ntp0.pipex.net 成功
(2)./msntp 158.43.50.229 失败
msntp: unable to locate IP address/number
msntp: Success
(3)./msntp 0x9e2b8021 成功
结论,请使用域名或者十六进制IP地址。