Skip to content
Browse files

Fix compile errors on OpenBSD, fix incorrect compile instructions for…

… FreeBSD in readme
  • Loading branch information...
UnknownShadow200 committed Apr 7, 2019
1 parent 1e647b1 commit 279dc09ccd4b6fac54a67ff558d77e973291192c
Showing with 8 additions and 2 deletions.
  1. +2 −2
  2. +6 −0 src/Logger.c
@@ -82,13 +82,13 @@ Install appropriate libs as required. For ubuntu these are: libx11-dev, libgl1-m
#### FreeBSD
```gcc *.c -o ClassiCube -I /usr/local/include -L /usr/Xlocal/lib -lm -lpthread -lX11 -lGL -lcurl -lopenal -lexecinfo```
```gcc *.c -o ClassiCube -I /usr/local/include -L /usr/local/lib -lm -lpthread -lX11 -lGL -lcurl -lopenal -lexecinfo```
#### OpenBSD
Install libexecinfo package if needed.
```gcc *.c -o ClassiCube -isystem /usr/X11R6/include -isystem /usr/local/include -L /usr/X11R6/lib -L /usr/local/lib -lX11 -lGL -lcurl -lopenal -lexecinfo```
```gcc *.c -o ClassiCube -I /usr/X11R6/include -I /usr/local/include -L /usr/X11R6/lib -L /usr/local/lib -lX11 -lGL -lcurl -lopenal -lexecinfo```
#### NetBSD
@@ -448,6 +448,7 @@ static void Logger_DumpRegisters(void* ctx) {
/* OSX: See /usr/include/mach/i386/_structs.h */
/* Solaris: See /usr/include/sys/regset.h */
/* NetBSD: See /usr/include/i386/mcontext.h */
/* OpenBSD: See /usr/include/machine/signal.h */

#if defined __i386__
#if defined CC_BUILD_LINUX
@@ -639,9 +640,14 @@ void Logger_Hook(void) {

void Logger_Abort2(ReturnCode result, const char* raw_msg) {
/* getcontext is absent on OpenBSD */
Logger_AbortCommon(result, raw_msg, NULL);
ucontext_t ctx;
Logger_AbortCommon(result, raw_msg, &ctx);

0 comments on commit 279dc09

Please sign in to comment.
You can’t perform that action at this time.