mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-09 04:57:06 +03:00
fix compile issue on latest esp-idf v4 - release
This commit is contained in:
@@ -12,6 +12,7 @@ idf_component_register( SRC_DIRS . external a1s tas57xx
|
||||
services
|
||||
raop
|
||||
display
|
||||
tools
|
||||
EMBED_FILES vu.data
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
idf_component_register(SRC_DIRS .
|
||||
idf_component_register(SRCS operator.cpp utf8.c
|
||||
REQUIRES esp_common pthread
|
||||
INCLUDE_DIRS .
|
||||
)
|
||||
|
||||
#doing our own implementation of new operator for some pre-compiled binaries
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _ZdlPv")
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u _Znwj")
|
||||
|
||||
|
||||
3
components/tools/operator.cpp
Normal file
3
components/tools/operator.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include <stdlib.h> // for malloc and free
|
||||
void* operator new(unsigned int size) { return malloc(size); }
|
||||
void operator delete(void* ptr) { if (ptr) free(ptr); }
|
||||
Reference in New Issue
Block a user