diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-05-14 19:15:55 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-05-14 19:15:55 +0000 |
commit | a5fd4fcafaf14f2b741573d935e51a68f1729996 (patch) | |
tree | b58cbef3c39ae30e738b5803d33cfdff72cbb245 | |
parent | f80040a8c26fc16f7c0979c95582857466c6a40d (diff) |
endianess portability patch from SHIROYAMA Takayuki
git-svn-id: file:///home/lennart/svn/public/nss-mdns/trunk@74 0ee8848e-81ea-0310-a63a-f631d1a40d77
-rw-r--r-- | src/query.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/query.c b/src/query.c index cf19235..546d072 100644 --- a/src/query.c +++ b/src/query.c @@ -248,7 +248,7 @@ static int recv_dns_packet(int fd, struct dns_packet **ret_packet, uint8_t* ret_ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg,cmsg)) { if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_TTL) { - *ret_ttl = *(uint8_t *) CMSG_DATA(cmsg); + *ret_ttl = (uint8_t) ntohl(*(uint32_t*)CMSG_DATA(cmsg)); break; } } |