diff options
| author | Lennart Poettering <lennart@poettering.net> | 2005-10-24 23:33:08 +0000 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2005-10-24 23:33:08 +0000 | 
| commit | 8b39fbe45e2dd0dec1b6e460cdb3abef25ad168a (patch) | |
| tree | 233152d11c699e7228eba9ed6e6ceddbf3c52472 | |
| parent | cd8fbe0eae35f5edd72b1265efd2b2145c3fae43 (diff) | |
* change setsocktopt for IP_TTL to use an int instead of an uin8_t for compatibility with non-linux systems
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@858 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
| -rw-r--r-- | avahi-core/socket.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/avahi-core/socket.c b/avahi-core/socket.c index b3bdac2..ef421c9 100644 --- a/avahi-core/socket.c +++ b/avahi-core/socket.c @@ -292,7 +292,7 @@ static int ipv6_pktinfo(int fd) {  int avahi_open_socket_ipv4(int no_reuse) {      struct sockaddr_in local; -    int fd = -1, r; +    int fd = -1, r, ittl;      uint8_t ttl, cyes;      if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { @@ -306,8 +306,8 @@ int avahi_open_socket_ipv4(int no_reuse) {          goto fail;      } -    ttl = 255; -    if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)) < 0) { +    ittl = 255; +    if (setsockopt(fd, IPPROTO_IP, IP_TTL, &ittl, sizeof(ittl)) < 0) {          avahi_log_warn("IP_TTL failed: %s", strerror(errno));          goto fail;      }  | 
