Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | From 18dc1457db8f66237e016b85a04dc50833c33c50 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 21 Dec 2019 12:09:51 -0800 |
| 4 | Subject: [PATCH] Define _GNU_SOURCE to get PTHREAD_MUTEX_INITIALIZER |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 5 | |
| 6 | Fixes |
| 7 | | zmalloc.c:87:37: error: 'PTHREAD_MUTEX_DEFAULT' undeclared here (not in a function) |
| 8 | | 87 | pthread_mutex_t used_memory_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 9 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 | |
| 11 | Upstream-Status: Pending |
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 13 | |
| 14 | --- |
| 15 | src/zmalloc.c | 1 + |
| 16 | 1 file changed, 1 insertion(+) |
| 17 | |
| 18 | diff --git a/src/zmalloc.c b/src/zmalloc.c |
| 19 | index ba03685..322304f 100644 |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 20 | --- a/src/zmalloc.c |
| 21 | +++ b/src/zmalloc.c |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 22 | @@ -32,6 +32,7 @@ |
| 23 | #include "config.h" |
| 24 | #include "solarisfixes.h" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 25 | |
| 26 | +#define _GNU_SOURCE |
| 27 | #include <stdio.h> |
| 28 | #include <stdlib.h> |
| 29 | #include <stdint.h> |