test/btstack_memory: fix test for newer gcc

This commit is contained in:
Matthias Ringwald 2021-03-07 19:11:00 +01:00
parent 21a1351894
commit 716552ac20
2 changed files with 6 additions and 1 deletions

View File

@ -55,6 +55,11 @@
#include <stdlib.h>
#ifdef ENABLE_MALLOC_TEST
extern "C" void * test_malloc(size_t size);
#define malloc test_malloc
#endif
#ifdef HAVE_MALLOC
typedef struct btstack_memory_buffer {
struct btstack_memory_buffer * next;

View File

@ -23,6 +23,6 @@
#define HCI_INCOMING_PRE_BUFFER_SIZE 6
// test hook to mock malloc
#define malloc test_malloc
#define ENABLE_MALLOC_TEST
#endif