On 9/7/06 1:51 PM, "Adrian Knoth" <adi_at_[hidden]> wrote:
>> (I'm willing to help with the configure.m4 mojo -- the
> That's good. Just check for struct sockaddr_in6 and add
> -DIPV6 to the CFLAGS. This flag is currently needed by
> opal/util/if.* and orte/mca/oob/tcp/*, so one might limit
> it to the two corresponding makefiles.
> We can also set/define IPV6 in something_config.h.
> It'd also be a good idea to have a --disable-ipv6 configure flag.
Done. See the attached patch (apply it, then re-run autogen.sh and
configure). It does three things:
1. Check if --disable-ipv6 was passed to configure.
2. Check to see if struct sockaddr_in6 exists.
3. Sets a macro OMPI_WANT_IPV6 to either 0 or 1 (i.e., it's always defined
and is therefore suitable for #if, not #ifdef):
- Set to 1 if --disable-ipv6 was not passed to configure *AND* struct
- Set to 0 otherwise
So surround your code with:
All you have to do to get this define is #include "ompi_config.h", which all
of the files should be doing already, anyway.
Let me know if this works for you.
Server Virtualization Business Unit