[Date Prev][Date Next] [Chronological] [Thread] [Top]

problems building current openldap-devel



For consideration as a patch, see the following context diff.
My poor old dumb pro C compiler from SUN won't do the initialization
of structures for non-static data items.  Actually, I like the old
version better, but my poor dumb old compiler....

Also, when building using CPPFLAGS=-I/usr/.../include and
LDFLAGS=-L/usr/.../lib, to find libdb.a and db.h in an alternate
location, in directories slapd and slapd/tools, I had to change
the Makefile line

LIBS = $(LDAP_LIBS) $(XLIBS) $(AC_LIBS)

to

LIBS = $(LDAP_LIBS) $(AC_LIBS) $(XLIBS)

because otherwise the -ldb contained in $(AC_LIBS) (via @LDBM_LIBS@) comes
before the -L/usr/.../lib in $(XLIBS), too late for the loader to find it.
This is not necessarily the best solution, and certainly does not automate
it.


Index: clients/tools/ldappasswd.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/clients/tools/ldappasswd.c,v
retrieving revision 1.3
diff -c -r1.3 ldappasswd.c
*** ldappasswd.c	1998/12/06 19:07:29	1.3
--- ldappasswd.c	1998/12/08 19:33:04
***************
*** 159,167 ****
  	int ret = 0;
  	char hashed_pw[128] = {'\0'};
  	char buf[128] = {'\0'};
! 	char *strvals[2] = {buf, NULL};
! 	LDAPMod mod, *mods[2] = {&mod, NULL};
  
  	if (!ld || !targetdn || !newpw)
  		return(1);
  
--- 159,171 ----
  	int ret = 0;
  	char hashed_pw[128] = {'\0'};
  	char buf[128] = {'\0'};
! 	char *strvals[2];
! 	LDAPMod mod, *mods[2];
  
+ 	strvals[0] = buf;
+ 	strvals[1] = NULL;
+ 	mods[0] = &mod;
+ 	mods[1] = NULL;
  	if (!ld || !targetdn || !newpw)
  		return(1);