[ap-utils] Mac OSX build failure
Chad Harp
chad.harp at mac.com
Sat May 1 05:11:38 EEST 2004
Looks like socket.h isn't getting included because OS_X isn't defined
(at least not on 10.2.8). Here's a quick patch that worked for me,
APPLE and MACH may be overkill, see below for other options.
% diff -u ../ap-utils-1.4.1pre4b.orig/lib/ap_search.c lib/ap_search.c
--- ../ap-utils-1.4.1pre4b.orig/lib/ap_search.c Sun Apr 4 12:14:44 2004
+++ lib/ap_search.c Fri Apr 30 20:51:01 2004
@@ -30,7 +30,7 @@
#include <sys/sockio.h>
#endif
-#ifdef OS_X
+#if defined(__APPLE__) && defined(__MACH__)
#include <sys/socket.h>
#endif
% gcc -dM -E - </dev/null
#define __BIG_ENDIAN__ 1
#define __HAVE_BUILTIN_SETJMP__ 1
#define __SIZE_TYPE__ long unsigned int
#define __GNUC_PATCHLEVEL__ 0
#define __NATURAL_ALIGNMENT__ 1
#define __APPLE_CC__ 1151
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __DYNAMIC__ 1
#define __WCHAR_TYPE__ int
#define __ppc__ 1
#define __APPLE__ 1
#define __MACH__ 1
#define __WINT_TYPE__ unsigned int
#define __GNUC__ 3
#define __GNUC_MINOR__ 1
#define __STDC__ 1
#define __PTRDIFF_TYPE__ int
#define __REGISTER_PREFIX__
#define __POWERPC__ 1
#define __NO_INLINE__ 1
#define __VERSION__ "3.1 20020420 (prerelease)"
--Chad
On Friday, April 30, 2004, at 07:20 PM, Chad Harp wrote:
> On Saturday 24 April 2004 12:47, Roman Festchook wrote:
> >> I've been trying to build ap-utils with Mac OS X 10.3.3
> .
> .
> .
>
> >This bug should be fixed in latest devel snapshot at
> http://ap-utils.polesye.net/?download. >Please try.
>
> I've tried the latest dev snapshot and still have an error (OSX
> 10.2.8/Darwin 6.8):
>
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I/usr/local/include -g
> -O2 -c `test -f 'ap_search.c' || echo './'`ap_search.c
> In file included from ap_search.c:37:
> /usr/include/net/if.h:185: field `ifru_addr' has incomplete type
> /usr/include/net/if.h:186: field `ifru_dstaddr' has incomplete type
> /usr/include/net/if.h:187: field `ifru_broadaddr' has incomplete type
> /usr/include/net/if.h:218: field `ifra_addr' has incomplete type
> /usr/include/net/if.h:219: field `ifra_broadaddr' has incomplete type
> /usr/include/net/if.h:220: field `ifra_mask' has incomplete type
> /usr/include/net/if.h:289: field `addr' has incomplete type
> /usr/include/net/if.h:290: field `dstaddr' has incomplete type
> make[2]: *** [ap_search.o] Error 1
>
> TY --Chad_______________________________________________
> ap-utils mailing list
> ap-utils at lists.polesye.net
> http://lists.polesye.net/mailman/listinfo/ap-utils
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2614 bytes
Desc: not available
Url : http://lists.polesye.net/pipermail/ap-utils/attachments/20040430/c3b875e4/attachment.bin
More information about the ap-utils
mailing list