Add NO_POSIX_MEMALIGN option in Makefile.libretro to support platform
that don't provide the posix_memalign() function.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
CFLAGS += -O2 -DNDEBUG
endif
CFLAGS += -DHAVE_MMAP=$(if $(NO_MMAP),0,1) \
- -DHAVE_PTHREAD=$(if $(NO_PTHREAD),0,1)
+ -DHAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \
+ -DHAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1)
CXXFLAGS += $(CFLAGS)
#DRC_DBG = 1
#PCNT = 1
#ifdef _3DS
vout_buf = linearMemAlign(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2, 0x80);
-#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && !defined(VITA) && !defined(__SWITCH__)
+#elif defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) && HAVE_POSIX_MEMALIGN
if (posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2) != 0)
vout_buf = (void *) 0;
#else