From c0d658875f95e999ae98a2544421522f8a236a8c Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 29 May 2020 17:06:38 +0000 Subject: [PATCH] Fix compilation on NetBSD --- source/CMakeLists.txt | 2 +- source/zmusic/fileio.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 5b55cd9..c43e5c5 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -53,7 +53,7 @@ endif() if( WIN32 ) add_definitions( -D_WIN32 ) set( SYS_LIBS winmm ) -else() +elseif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "^NetBSD$") set( SYS_LIBS dl ) endif() diff --git a/source/zmusic/fileio.h b/source/zmusic/fileio.h index dcea971..e1cff1e 100644 --- a/source/zmusic/fileio.h +++ b/source/zmusic/fileio.h @@ -27,6 +27,7 @@ #include #include #include +#include #if defined _WIN32 && !defined _WINDOWS_ // only define this if windows.h is not included. // I'd rather not include Windows.h for just this. This header is not supposed to pollute everything it touches.