From 05a32db31b6fe3ffff5861aa6fb5a39f3dc9e719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Palmat=C3=A8?= Date: Tue, 16 Apr 2024 18:37:22 +0200 Subject: [PATCH] Small newlib fixes --- src/CMakeLists.txt | 6 +++++- src/os4_init.c | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4fd0084a..0b3f025f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,7 +167,11 @@ endif() if (GLFW_BUILD_OS4) target_compile_options(glfw PRIVATE "-DGL4ES" "-gstabs") - target_link_libraries(glfw PRIVATE "-lGL") + if (CLIB4) + target_link_libraries(glfw PRIVATE "-lGL") + else() + target_link_libraries(glfw PRIVATE "-lgl4es -ldl") + endif() endif() if (GLFW_BUILD_COCOA) diff --git a/src/os4_init.c b/src/os4_init.c index 6b5d7384..ef8d8f9b 100644 --- a/src/os4_init.c +++ b/src/os4_init.c @@ -29,9 +29,15 @@ #include "internal.h" +#ifndef CLIB4 +#undef __STRICT_ANSI__ +#endif + #include #include #include +#include +#include extern struct Library *DOSBase; extern struct DOSIFace *IDOS;