Mailing List Archive

Building libspf2-1.2.5 on Mac OS X - problems and patches
Hi,

I tried to build libspf2-1.2.5 on Mac OS X 10.3.8 and I encountered and
solved the following problems:

1. configure script incorrectly tests for ns_type in resolv.h and fails
to define HAVE_NS_TYPE. It's because the test C program doesn't include
sys/types.h and fails to compile even though everything else is all
right.

2. configure script incorrectly tests for res_query() in lresolv and
doesn't include -lresolv when linking the programs. This leads to
unresolved symbols. Again, the problem is missing includes sys/types.h
and netinet/in.h in the test C program.

3. Mac OS X has some newer interface in <arpa/nameser.h> that is not
compatible with what libspf2 uses. Including <arpa/nameser8_compat.h>
right after <arpa/nameser.h> in src/include/spf_sys_config.h solves the
problem.

Issues 1. and 2. are fixed by this patch to configure:

diff -r libspf2-1.2.5/configure libspf2-1.2.5-new/configure
22075c22075,22080
<
---
> #ifdef HAVE_SYS_TYPES_H
> #include <sys/types.h>
> #endif
> #ifdef HAVE_NETINET_IN_H
> #include <netinet/in.h>
> #endif
23663c23668,23670
<
---
> #ifdef HAVE_SYS_TYPES_H
> #include <sys/types.h>
> #endif

Issue 3. is fixed by this patch to src/include/spf_sys_config.h:

diff -r libspf2-1.2.5/src/include/spf_sys_config.h
libspf2-1.2.5-new/src/include/spf_sys_config.h
40a41,43
> # ifdef __APPLE__
> # include <arpa/nameser8_compat.h>
> # endif

Jaroslav Snajdr
Kerio Technologies


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=spf-devel@v2.listbox.com