[Linux-ha-dev] Problem.. new code..
Tue, 13 Mar 2001 12:18:38 -0800
Heh, I was surprised that this didn't show up earlier. But I understand
now, the Makefile bit of the patch didn't make it in, so this module
wasn't being compiled.
Using IPPROTO_IP should be more portable. If you don't have SIOCGIFINDEX
there is a way to get the index of an interface that may be more
portable using routing sockets. It's not quite as nice and clean though
It looks like you don't have the ip_mreqn struct, which is a newer
replacement to the ip_mreq struct. Without this there is little use for
the device index, so the need for SIOCGIFINDEX goes away.
The change to using IPPROTO_IP is trivial. The change away from the
device index is less trivial, although I can whip it up in the next day
or so. Not sure if alan wants to make these kinds of changes this late
in the game???
* Matthew Soffen (email@example.com) wrote:
> New code in the heartbeat/mcast.c doesn't compile
> gcc -g -Wall -Wmissing-prototypes -Wmissing-declarations
> -Wstrict-prototypes -Wshadow -Wpointer-arith -Wwrite-strings -Werror
> -I. -I../stonith -DVERSION='"0.4.8n"' -DHA_D='"/etc/ha.d"'
> -DHALIB='"/usr/lib/heartbeat"' -DVAR_RUN_D='"/var/run"' -DVAR_LIB_D='"/v
> ar/lib/heartbeat"' -DFIFONAME='"/var/run/heartbeat-fifo"' -c -o
> mcast.o mcast.c
> mcast.c: In function `set_mcast_loop':
> mcast.c:586: `SOL_IP' undeclared (first use in this function)
> mcast.c:586: (Each undeclared identifier is reported only once
> mcast.c:586: for each function it appears in.)
> mcast.c: In function `set_mcast_ttl':
> mcast.c:605: `SOL_IP' undeclared (first use in this function)
> mcast.c: In function `set_mcast_if':
> mcast.c:616: storage size of `mreq' isn't known
> mcast.c:626: `SOL_IP' undeclared (first use in this function)
> cc1: warnings being treated as errors
> mcast.c:616: warning: unused variable `mreq'
> mcast.c: In function `join_mcast_group':
> mcast.c:638: storage size of `mreq_add' isn't known
> mcast.c:649: `SOL_IP' undeclared (first use in this function)
> mcast.c:638: warning: unused variable `mreq_add'
> mcast.c: In function `if_NameToIndex':
> mcast.c:676: `SIOCGIFINDEX' undeclared (first use in this function)
> mcast.c:682: structure has no member named `ifr_ifindex'
> mcast.c:683: warning: control reaches end of non-void function
> Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
> Home Page: http://linux-ha.org/