FAQ about patches | More patches | Main Page

patch to build ldap support of Pine in Mac OS 10.2.2
Versions of pine the patch is available for: pine 4.44
This is the explanation about this patch, written by the author.
I doubt this works on 10.1, and I've only tested it on 10.2.2, but I think it ought to work on any 10.2.
OS X comes with OpenLDAP 2.1.x. Between OpenLDAP 2.0 and 2.1, a number of functions were removed, notably the ldap_url_* functions. Pine 4.44 uses ldap_url_search_st in adrbkcmd.c, so if you try to compile it against the system libraries as-is, you'll get a link error.
This patch changes the call from 2.0-style to 2.1-style
You'll probably also have to modify contrib/ldap-setup to make sure it exits with a return value of 3. My simple expedient is to replace the entire script with this one:
exit 3
I'm sure there's a better way to do that, though. Then, in the pine4.44 directory, do this:
mkdir ldap
ln -s /usr/include ldap/
ln -s /usr/lib ldap/libraries

(If you haven't already edited pico/osdep/os-osx.h to comment out the line near the end which reads:
extern int sys_nerr;
now would be a good time to do that, or the build will fail.)
To build pine, run the build script like so:
./build osx EXTRALDFLAGS=-lncurses
Standard disclaimers apply. I'm not a very good programmer, so someone might want to take a closer look at my patch to make sure it doesn't do Bad Things. I just saw a similar patch for another project and modified it to fit Pine.

Last Updated 08:58:24 PST Thu Nov 21 2002