# HG changeset patch # User Olaf Wintermann # Date 1375263357 -7200 # Node ID 5eecce5314d6b3fc5ef6bd87e8f760df74393f4b # Parent 73b3485e96f1cd989f69e06407024d9e9ea190f4 fixed solaris build diff -r 73b3485e96f1 -r 5eecce5314d6 configure --- a/configure Tue Jul 16 12:14:13 2013 +0200 +++ b/configure Wed Jul 31 11:35:57 2013 +0200 @@ -35,8 +35,8 @@ HOST=`uname -n` INSTALL_DIR=`pwd`/work -OPENSSL_CFLAGS=`pkg-config --cflags openssl` -OPENSSL_LDFLAGS=`pkg-config --libs openssl` +LIBS_CFLAGS=`pkg-config --cflags libxml-2.0 openssl` +LIBS_LDFLAGS=`pkg-config --libs libxml-2.0 openssl` # create config.mk echo "generate config.mk" @@ -72,8 +72,8 @@ include \$(BUILD_ROOT)/make/$CCONF include \$(BUILD_ROOT)/make/$PLATFORM -CFLAGS += $OPENSSL_CFLAGS -LDFLAGS += $OPENSSL_LDFLAGS +CFLAGS += $LIBS_CFLAGS +LDFLAGS += $LIBS_LDFLAGS " >> config.mk diff -r 73b3485e96f1 -r 5eecce5314d6 make/solaris.mk --- a/make/solaris.mk Tue Jul 16 12:14:13 2013 +0200 +++ b/make/solaris.mk Wed Jul 31 11:35:57 2013 +0200 @@ -28,7 +28,7 @@ # compiler and linker flags - +CFLAGS += -DSOLARIS LDFLAGS += -lsendfile -lposix4 -lpthread -ldl -lm -lxerces-c -lldap PLUGINS = java diff -r 73b3485e96f1 -r 5eecce5314d6 src/server/daemon/ldap_auth.c --- a/src/server/daemon/ldap_auth.c Tue Jul 16 12:14:13 2013 +0200 +++ b/src/server/daemon/ldap_auth.c Wed Jul 31 11:35:57 2013 +0200 @@ -36,6 +36,14 @@ #include "ldap_auth.h" +static void ws_ldap_close(LDAP *ldap) { +#ifdef SOLARIS + ldap_unbind(ldap); +#else + ldap_unbind_ext_s(ld, NULL, NULL); +#endif +} + AuthDB* create_ldap_authdb(char *name, LDAPConfig *conf) { LDAPAuthDB *authdb = malloc(sizeof(LDAPAuthDB)); authdb->authdb.name = strdup(name); @@ -92,8 +100,8 @@ NULL, &server_cred); if (r != LDAP_SUCCESS) { - //ldap_unbind(ld); - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); + fprintf(stderr, "ldap_simple_bind_s failed: %s\n", ldap_err2string(r)); return NULL; } @@ -122,8 +130,8 @@ 1, // size limit &result); if (r != LDAP_SUCCESS) { - //ldap_unbind(ld); - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); + fprintf(stderr, "ldap_search_ext_s failed\n"); return NULL; } @@ -150,7 +158,7 @@ } } - ldap_unbind_ext_s(ld, NULL, NULL); + ws_ldap_close(ld); return NULL; } @@ -188,7 +196,6 @@ LDAPUser *user = (LDAPUser*)u; ldap_memfree(user->userdn); // TODO: use connection pool - //ldap_unbind(user->ldap); - ldap_unbind_ext_s(user->ldap, NULL, NULL); + ws_ldap_close(user->ldap); free(user); } diff -r 73b3485e96f1 -r 5eecce5314d6 src/server/webdav/parser.c --- a/src/server/webdav/parser.c Tue Jul 16 12:14:13 2013 +0200 +++ b/src/server/webdav/parser.c Wed Jul 31 11:35:57 2013 +0200 @@ -111,7 +111,7 @@ } else if(p->davPropTag && !p->rq->allprop && depth == 2) { DavProperty *property = pool_malloc(pool, sizeof(DavProperty)); property->xmlns = xmlnsmap_put(p->rq->nsmap, (char*)ns); - property->name = pool_strdup(pool, name); + property->name = pool_strdup(pool, (const char*)name); // add property to DavRequest UcxDlist *elm = pool_malloc(pool, sizeof(UcxDlist));