Hi,
using the info from http://www.openldap.org/faq/data/cache/719.html
I almost got OpenLDAP-2.3.33 to run on z/OS 1.7 with XPLINK and ASCII
options.
I used this compiler script acc:
exec /bin/c89 -Wc,LANGLVL\(EXTENDED\) -Wc,XPLINK,ASCII -Wl,XPLINK
-D_XOPEN_SOURCE_EXTENDED=1 -D_OPEN_THREADS -D_OPEN_SYS_SOCK_IPV6
-D_ISOC99_SOURCE $*
I got the server and tools to compile and link (z/OS 1.7). ldapsearch
works against IBM's z/OS LDAP server.
The openldap server starts, says it is listening, the bind address is
OK (I added some more debug output), but the socket is closed and
cannot be connected to.
Have you ever seen this? Actually in daemon.c there seems to be no
listen() call, so I wonder if the listen() call fails, I'll have to
check tomorrow.
Another source of problems might be that not all headers are included,
e.g. daemon.c uses inet_ntop() which requires arpa/inet.h but is not
included.
I think the ASCII library functions versions are only pulled in if the
header is included, so some magic preprocessor tricks that select
ascii versions can trigger.
#define _OPEN_SYS_SOCK_IPV6
#include <arpa/inet.h>
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);