diff options
| author | Khem Raj <raj.khem@gmail.com> | 2022-02-07 16:30:23 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-02-07 16:36:08 -0800 |
| commit | f0484dae3ac77afef11a74637534e29a8a8dfe72 (patch) | |
| tree | e38be608b9625354d5a4ca03b936e18c6a5cc782 /meta-oe | |
| parent | 2d12e857077d9b23b449f9af4031ced37630644c (diff) | |
| download | meta-openembedded-f0484dae3ac77afef11a74637534e29a8a8dfe72.tar.gz | |
openldap: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-support/openldap/openldap/0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch | 54 | ||||
| -rw-r--r-- | meta-oe/recipes-support/openldap/openldap_2.5.9.bb | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap/0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch b/meta-oe/recipes-support/openldap/openldap/0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch new file mode 100644 index 0000000000..bcd1525b67 --- /dev/null +++ b/meta-oe/recipes-support/openldap/openldap/0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From 79381ab335898c9184e22dd25b544adefa9bf6c5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 7 Feb 2022 16:26:57 -0800 | ||
| 4 | Subject: [PATCH] librewrite: include ldap_pvt_thread.h before redefining | ||
| 5 | calloc | ||
| 6 | |||
| 7 | This helps compiling with musl, where sched.h is included by | ||
| 8 | ldap_pvt_thread.h which provides prototype for calloc() and conflicts | ||
| 9 | |||
| 10 | /usr/include/sched.h:84:7: error: conflicting types for 'ber_memcalloc' | ||
| 11 | | void *calloc(size_t, size_t); | ||
| 12 | | ^1 | ||
| 13 | | warning and 1 error generated. | ||
| 14 | | ./rewrite-int.h:44:21: note: expanded from macro 'calloc' | ||
| 15 | | #define calloc(x,y) ber_memcalloc(x,y) | ||
| 16 | | ^ | ||
| 17 | |||
| 18 | Upstream-Status: Pending | ||
| 19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 20 | --- | ||
| 21 | libraries/librewrite/rewrite-int.h | 10 +++++----- | ||
| 22 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/libraries/librewrite/rewrite-int.h b/libraries/librewrite/rewrite-int.h | ||
| 25 | index 4481dd3..5ec226d 100644 | ||
| 26 | --- a/libraries/librewrite/rewrite-int.h | ||
| 27 | +++ b/libraries/librewrite/rewrite-int.h | ||
| 28 | @@ -40,6 +40,11 @@ | ||
| 29 | |||
| 30 | #include <rewrite.h> | ||
| 31 | |||
| 32 | +#ifndef NO_THREADS | ||
| 33 | +#define USE_REWRITE_LDAP_PVT_THREADS | ||
| 34 | +#include <ldap_pvt_thread.h> | ||
| 35 | +#endif | ||
| 36 | + | ||
| 37 | #define malloc(x) ber_memalloc(x) | ||
| 38 | #define calloc(x,y) ber_memcalloc(x,y) | ||
| 39 | #define realloc(x,y) ber_memrealloc(x,y) | ||
| 40 | @@ -47,11 +52,6 @@ | ||
| 41 | #undef strdup | ||
| 42 | #define strdup(x) ber_strdup(x) | ||
| 43 | |||
| 44 | -#ifndef NO_THREADS | ||
| 45 | -#define USE_REWRITE_LDAP_PVT_THREADS | ||
| 46 | -#include <ldap_pvt_thread.h> | ||
| 47 | -#endif | ||
| 48 | - | ||
| 49 | /* | ||
| 50 | * For details, see RATIONALE. | ||
| 51 | */ | ||
| 52 | -- | ||
| 53 | 2.35.1 | ||
| 54 | |||
diff --git a/meta-oe/recipes-support/openldap/openldap_2.5.9.bb b/meta-oe/recipes-support/openldap/openldap_2.5.9.bb index f3b8c6c987..b80bde8490 100644 --- a/meta-oe/recipes-support/openldap/openldap_2.5.9.bb +++ b/meta-oe/recipes-support/openldap/openldap_2.5.9.bb | |||
| @@ -23,6 +23,7 @@ SRC_URI = "http://www.openldap.org/software/download/OpenLDAP/openldap-release/$ | |||
| 23 | file://0001-ldif-filter-fix-parallel-build-failure.patch \ | 23 | file://0001-ldif-filter-fix-parallel-build-failure.patch \ |
| 24 | file://0001-build-top.mk-unset-STRIP_OPTS.patch \ | 24 | file://0001-build-top.mk-unset-STRIP_OPTS.patch \ |
| 25 | file://0001-libraries-Makefile.in-ignore-the-mkdir-errors.patch \ | 25 | file://0001-libraries-Makefile.in-ignore-the-mkdir-errors.patch \ |
| 26 | file://0001-librewrite-include-ldap_pvt_thread.h-before-redefini.patch \ | ||
| 26 | " | 27 | " |
| 27 | 28 | ||
| 28 | SRC_URI[md5sum] = "237fc2d881c27f8dd5d9f396e2865c11" | 29 | SRC_URI[md5sum] = "237fc2d881c27f8dd5d9f396e2865c11" |
