Full_Name: Mark Version: 2.4.33 OS: Solaris 10 & 11 URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (203.63.89.15)
The stock 2.4.33 fails to compile mdb with this error:
cc -I/usr/local/include -L/usr/local/lib -I../../../include -I../../../include -I.. -I./.. -I./../../../libraries/libmdb -I/usr/local/include -L/usr/local/lib -c ./../../../libraries/libmdb/mdb.c -o mdb.o "./../../../libraries/libmdb/mdb.c", line 3514: undefined symbol: top "./../../../libraries/libmdb/mdb.c", line 3514: left operand of "->" must be pointer to struct/union cc: acomp failed for ./../../../libraries/libmdb/mdb.c
The problem is top is defined inside #if MDB_DEBUG but used without the same #if qualifier.
The fix is: /bin/perl -pe '($. == 3514) && s%^%#if MDB_DEBUG\n%' -i libraries/libmdb/mdb.c /bin/perl -pe '($. == 3517) && s%^%#endif\n%' -i libraries/libmdb/mdb.c