From: Dave Hart Date: Thu, 13 May 2010 15:39:47 +0000 (+0000) Subject: * [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations). X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7121d64352e99424581dc0c2f5c30314e6882f3;p=thirdparty%2Fntp.git * [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations). bk: 4bec1d43GvOZaJbV3dwYtcB1WYrZkQ --- diff --git a/ChangeLog b/ChangeLog index 74205bd7ae..c9f9f77a71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +--- + +* [Bug 1555] 4.2.6p2-RC3 sntp illegal C (mixed code and declarations). + --- (4.2.6p2-RC3) 2010/05/11 Released by Harlan Stenn diff --git a/sntp/networking.c b/sntp/networking.c index 91f3a284ba..92b699cc6f 100644 --- a/sntp/networking.c +++ b/sntp/networking.c @@ -1,3 +1,4 @@ +#include #include "networking.h" char adr_buf[INET6_ADDRSTRLEN]; @@ -171,6 +172,10 @@ recv_bcst_data ( GETSOCKNAME_SOCKLEN_TYPE ss_len; struct timeval timeout_tv; fd_set bcst_fd; +#ifdef MCAST + struct ip_mreq mdevadr; + TYPEOF_IP_MULTICAST_LOOP mtrue = 1; +#endif setsockopt(rsock, SOL_SOCKET, SO_REUSEADDR, &btrue, sizeof(btrue)); if (IS_IPV4(sas)) { @@ -181,9 +186,6 @@ recv_bcst_data ( } #ifdef MCAST - struct ip_mreq mdevadr; - TYPEOF_IP_MULTICAST_LOOP mtrue = 1; - if (setsockopt(rsock, IPPROTO_IP, IP_MULTICAST_LOOP, &mtrue, sizeof(mtrue)) < 0) { /* some error message regarding setting up multicast loop */ return BROADCAST_FAILED;