On 7/10/07, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote:
Terry Wilson wrote:
> When trying to compile axis2c to create a 4-way universal binary
> (ppc/x86 32/64-bit) under OS X leopard:
>
> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386
> -arch ppc7400 -arch x86_64 -arch ppc64" LDFLAGS="-arch i386 -arch
> ppc7400 -arch x86_64 -arch ppc64" ./configure
> --disable-dependency-tracking --with-apache2=/usr/include/apache2
> --with-apr=/usr/include/apr-1
>
> the following compile error (warning, but -Werror) occurs which halts
> compilation for 64-bit:
>
> uuid_gen_unix.c:313: warning: cast to pointer from integer of
> different size
> Anyway, thanks for the help and let me know if there is anything I can
> do to help (test patches, etc.).
You are always welcome to provide patches :) And your comments and
feedback are always welcome.
Ok. Patch attached. :-) I think I found the problem. Compiles
cleanly after adding proper header and casting to (struct ether_addr
*).
Index: util/src/platforms/unix/uuid_gen_unix.c
===================================================================
--- util/src/platforms/unix/uuid_gen_unix.c (revision 555148)
+++ util/src/platforms/unix/uuid_gen_unix.c (working copy)
@@ -35,6 +35,7 @@
# include <sys/sockio.h>
# include <net/if.h>
# include <net/if_arp.h>
+# include <net/ethernet.h>
# endif
# ifdef HAVE_NET_IF_TYPES_H
# include <net/if_types.h>
@@ -310,7 +311,7 @@
/* just take the ethernet adapters */
if (sdl->sdl_type == IFT_ETHER)
{
- macaddr = (char *)ether_ntoa(LLADDR(sdl));
+ macaddr = ether_ntoa((struct ether_addr *) LLADDR(sdl));
}
}
cp += sizeof(ifr->ifr_name) + max(sizeof(ifr->ifr_addr),
ifr->ifr_addr.sa_len);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]