From e492a4fb15eacae586c678a6a95e35a52ea1cb6c Mon Sep 17 00:00:00 2001 From: Luiz Pestana Date: Mon, 30 May 2022 21:03:33 -0300 Subject: [PATCH] Fix dlfcn for switch --- src/switch-nx/dlfcn.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/switch-nx/dlfcn.h b/src/switch-nx/dlfcn.h index 247b59f8a..592c73fdf 100644 --- a/src/switch-nx/dlfcn.h +++ b/src/switch-nx/dlfcn.h @@ -1,6 +1,12 @@ /* Required file to make miniaudio.h compile to Switch */ +#ifndef dlfcn_h +#define dlfcn_h + +#ifndef alloca +#define alloca(s) __builtin_alloca(s) +#endif #define RTLD_LAZY 0x00001 #define RTLD_NOW 0x00002 @@ -19,3 +25,5 @@ char *dlerror(void); int pthread_attr_setschedpolicy(pthread_attr_t *, int) { return 0; } int sched_get_priority_max(int policy) { return 0; } int sched_get_priority_min(int policy) { return 0; } + +#endif