Fixed some warnings when building on Linux with -DSDL_LIBC=OFF

This commit is contained in:
Sam Lantinga
2022-11-26 05:18:26 -08:00
parent e9014ee769
commit bde808cd87
4 changed files with 20 additions and 12 deletions

View File

@@ -1470,12 +1470,14 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
file(GLOB CORE_UNIX_SOURCES ${SDL3_SOURCE_DIR}/src/core/unix/*.c)
list(APPEND SOURCE_FILES ${CORE_UNIX_SOURCES})
check_c_source_compiles("
#include <linux/input.h>
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
int main(int argc, char** argv) { return 0; }" HAVE_INPUT_EVENTS)
if (HAVE_LINUX_INPUT_H)
check_c_source_compiles("
#include <linux/input.h>
#ifndef EVIOCGNAME
#error EVIOCGNAME() ioctl not available
#endif
int main(int argc, char** argv) { return 0; }" HAVE_INPUT_EVENTS)
endif()
if(LINUX)
check_c_source_compiles("