summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch')
-rw-r--r--meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch
new file mode 100644
index 0000000000..9a40d832f1
--- /dev/null
+++ b/meta-oe/recipes-extended/redis/redis/GNU_SOURCE.patch
@@ -0,0 +1,19 @@
1Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER
2
3Fixes
4| zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function)
5| 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER;
6| | ^~~~~~~~~~~~~~~~~~~~~~~~~
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10--- a/src/zmalloc.c
11+++ b/src/zmalloc.c
12@@ -28,6 +28,7 @@
13 * POSSIBILITY OF SUCH DAMAGE.
14 */
15
16+#define _GNU_SOURCE
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <stdint.h>