Wietse Venema:
> Eray Aslan:
> > postfix-2.11-20131031: On a computer without lmdb support, make fails with:
> >
> > gcc -Wmissing-prototypes -Wformat -Wno-comment -DHAS_PCRE -DSNAPSHOT -g
> > -O -I. -DLINUX3 -c slmdb.c
> > In file included from slmdb.c:160:0:
> > ./slmdb.h:23:18: fatal error: lmdb.h: No such file or directory
> > #include <lmdb.h>
>
> Did you enable LMDB support? Postfix should not try to include
> that file if you don't.
This patch prevents lmdb.h from being included when LMDB
support is not turned on.
Wietse
diff --exclude=man --exclude=html --exclude=README_FILES --exclude=INSTALL
--exclude=.indent.pro --exclude=Makefile.in -r -cr
/var/tmp/postfix-2.11-20131031/src/util/slmdb.c ./src/util/slmdb.c
*** /var/tmp/postfix-2.11-20131031/src/util/slmdb.c Thu Oct 31 20:30:17 2013
--- ./src/util/slmdb.c Fri Nov 1 06:41:42 2013
***************
*** 146,151 ****
--- 146,153 ----
/* Yorktown Heights, NY 10598, USA
/*--*/
+ #ifdef HAS_LMDB
+
/* System library. */
#include <sys/stat.h>
***************
*** 662,664 ****
--- 664,668 ----
return (status);
}
+
+ #endif