Browse Source

Upstream support for OpenBSD. (#414)

pull/415/head
Bryan Steele 7 years ago committed by Anders Jenbo
parent
commit
0086927ee1
  1. 4
      CMakeLists.txt
  2. 2
      SourceS/miniwin.h

4
CMakeLists.txt

@ -62,8 +62,10 @@ endif()
list(APPEND CMAKE_MODULE_PATH "${DevilutionX_SOURCE_DIR}/CMake")
if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD OR ${CMAKE_SYSTEM_NAME} STREQUAL OpenBSD)
set(ASAN OFF)
set(UBSAN OFF)
add_definitions(-D_BSD_SOURCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DO_LARGEFILE=0 -Dstat64=stat -Dlstat64=lstat -Dlseek64=lseek -Doff64_t=off_t -Dfstat64=fstat -Dftruncate64=ftruncate")
endif()

2
SourceS/miniwin.h

@ -3,7 +3,7 @@
#include <ctype.h>
#include <math.h>
// work around https://reviews.llvm.org/D51265
#if defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include "macos_stdarg.h"
#else
#include <stdarg.h>

Loading…
Cancel
Save