From 2cea3d17b54d764c5ad38ea4150b771ebbc8788f Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Sun, 11 Feb 2018 20:29:57 +0000 Subject: [PATCH] Force gnu99 since it's currently required Signed-off-by: Mahyar Koshkouei --- Makefile | 8 +------- mpv-libretro.c | 7 ++++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d98b77c..fd310c6 100644 --- a/Makefile +++ b/Makefile @@ -98,12 +98,6 @@ ifneq (,$(findstring gles,$(platform))) CFLAGS += -DHAVE_OPENGLES endif -ifneq (,$(findstring qnx,$(platform))) -CFLAGS += -Wc,-std=c99 -else -CFLAGS += -std=gnu99 -endif - # Locale support should be enabled by default, as it's most common. ifneq ($(locale),false) CFLAGS += -DHAVE_LOCALE @@ -119,7 +113,7 @@ endif OBJECTS := mpv-libretro.o LDFLAGS += -lmpv -ldl -CFLAGS += -Wall -pedantic +CFLAGS += -Wall -pedantic -std=gnu99 all: $(TARGET) diff --git a/mpv-libretro.c b/mpv-libretro.c index 35c8176..1f7a9a9 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -123,9 +123,10 @@ static void *get_proc_address_mpv(void *fn_ctx, const char *name) void *proc_addr = (void *) hw_render.get_proc_address(name); #pragma GCC diagnostic pop - // EGL 1.4 (supported by the RPI firmware) does not necessarily return - // function pointers for core functions. - if (!proc_addr) { + /* EGL 1.4 (supported by the RPI firmware) does not necessarily return + * function pointers for core functions. + */ + if (!proc_addr) { void *h = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_LAZY); if (!h)