From 8b39fbe45e2dd0dec1b6e460cdb3abef25ad168a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 Oct 2005 23:33:08 +0000 Subject: [PATCH] * 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 --- avahi-core/socket.c | 6 +++--- 1 file 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; } -- 2.39.5