[evolution-data-server/gnome-3-32] I#99 - Fails to build against git master of OpenLDAP (vendor version check)
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-32] I#99 - Fails to build against git master of OpenLDAP (vendor version check)
- Date: Fri, 12 Apr 2019 10:31:18 +0000 (UTC)
commit 4608d97308e33cef2a8311258df8099961a23964
Author: Дилян Палаузов <dilyan palauzov aegee org>
Date: Fri Apr 12 12:25:36 2019 +0200
I#99 - Fails to build against git master of OpenLDAP (vendor version check)
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/99
cmake/modules/FindLDAP.cmake | 3 ++-
src/addressbook/backends/ldap/e-book-backend-ldap.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/cmake/modules/FindLDAP.cmake b/cmake/modules/FindLDAP.cmake
index abbc3280d..a98bbba76 100644
--- a/cmake/modules/FindLDAP.cmake
+++ b/cmake/modules/FindLDAP.cmake
@@ -86,7 +86,8 @@ set(CMAKE_REQUIRED_LIBRARIES "${LDAP_LIBS}")
if(WITH_OPENLDAP)
CHECK_C_SOURCE_COMPILES("#include \"ldap.h\"
int main(void) {
- #if !defined(LDAP_VENDOR_VERSION) || LDAP_VENDOR_VERSION < 20000
+ /* LDAP_VENDOR_VERSION is 0 if OpenLDAP is built from git/master */
+ #if !defined(LDAP_VENDOR_VERSION) || (LDAP_VENDOR_VERSION != 0 &&
LDAP_VENDOR_VERSION < 20000)
#error OpenLDAP version not at least 2.0
#endif
return 0; }" openldap_2_x)
diff --git a/src/addressbook/backends/ldap/e-book-backend-ldap.c
b/src/addressbook/backends/ldap/e-book-backend-ldap.c
index 5d6a0b72c..0156a5caf 100644
--- a/src/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/src/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -42,7 +42,8 @@
#define d(x)
-#if LDAP_VENDOR_VERSION > 20000
+/* LDAP_VENDOR_VERSION is 0 if OpenLDAP is built from git/master */
+#if !defined(LDAP_VENDOR_VERSION) || LDAP_VENDOR_VERSION == 0 || LDAP_VENDOR_VERSION > 20000
#define OPENLDAP2
#else
#define OPENLDAP1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]