blob: 12f9e7abccc0567c9574bebc9a4b8a8724170b7c [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From 96233a8382b9520293a48b08dc3b204a21205800 Mon Sep 17 00:00:00 2001
2From: Wang Mingyu <wangmy@cn.fujitsu.com>
3Date: Fri, 24 Apr 2020 00:53:19 +0900
4Subject: [PATCH] Fix bug of free() with musl
5
6This fixes build error with musl C library:
7/ubinux-dev/ubinux001/contribution/build/tmp/work/armv7vet2hf-neon-poky-linux-musleabi/paho-mqtt-c/1.3.2-r0/git/src/Heap.h:55:24:
8error: expected declaration specifiers or '...' before string constant
9 55 | #define free(x) myfree(__FILE__, __LINE__, x)
10 | ^~~~~~~~
11/ubinux-dev/ubinux001/contribution/build/tmp/work/armv7vet2hf-neon-poky-linux-musleabi/paho-mqtt-c/1.3.2-r0/git/src/Heap.h:55:34:
12error: expected declaration specifiers or '...' before numeric constant
13 55 | #define free(x) myfree(__FILE__, __LINE__, x)
14 | ^~~~~~~~
15
16Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
17---
18 src/MQTTReasonCodes.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/src/MQTTReasonCodes.c b/src/MQTTReasonCodes.c
22index 416eab5..479dbac 100644
23--- a/src/MQTTReasonCodes.c
24+++ b/src/MQTTReasonCodes.c
25@@ -16,10 +16,10 @@
26
27 #include "MQTTReasonCodes.h"
28
29-#include "Heap.h"
30 #include "StackTrace.h"
31
32 #include <memory.h>
33+#include "Heap.h"
34
35 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
36
37--
382.17.1
39