From 847c64b00da12ca08bef9e947eb948e378eeaef8 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 27 Mar 2023 19:52:34 +0200 Subject: [PATCH] Use SDL alloc functions in libusb/hid.c --- src/hidapi/libusb/hid.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c index 5effc371e..465d8fd4d 100644 --- a/src/hidapi/libusb/hid.c +++ b/src/hidapi/libusb/hid.c @@ -30,6 +30,18 @@ #include "SDL_internal.h" #include "../../thread/SDL_systhread.h" +#ifdef calloc +#undef calloc +#endif +#define calloc SDL_calloc +#ifdef malloc +#undef malloc +#endif +#define malloc SDL_malloc +#ifdef free +#undef free +#endif +#define free SDL_free #ifdef realloc #undef realloc #endif