aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redist/json_helpers.c2
-rw-r--r--src/survive_config.c4
-rwxr-xr-xsrc/survive_vive.c6
3 files changed, 12 insertions, 0 deletions
diff --git a/redist/json_helpers.c b/redist/json_helpers.c
index 2413a67..7690318 100644
--- a/redist/json_helpers.c
+++ b/redist/json_helpers.c
@@ -7,7 +7,9 @@
#include <string.h>
#include "json_helpers.h"
#include <jsmn.h>
+#ifndef __FreeBSD__
#include <malloc.h>
+#endif
#ifdef _WIN32
#include <stdarg.h>
diff --git a/src/survive_config.c b/src/survive_config.c
index 7435cc4..07b9326 100644
--- a/src/survive_config.c
+++ b/src/survive_config.c
@@ -3,7 +3,11 @@
#include <assert.h>
#include "survive_config.h"
#include <json_helpers.h>
+#ifdef __FreeBSD__
+#include <stdlib.h>
+#else
#include <malloc.h> //for alloca
+#endif
#include <errno.h>
//#define MAX_CONFIG_ENTRIES 100
diff --git a/src/survive_vive.c b/src/survive_vive.c
index 728c3c9..1929b1a 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -18,7 +18,9 @@
#include <string.h>
#include <sys/stat.h>
#include <os_generic.h>
+#ifndef __FreeBSD__
#include <malloc.h> // for alloca
+#endif
#ifdef HIDAPI
#if defined(WINDOWS) || defined(WIN32) || defined (_WIN32)
@@ -27,8 +29,12 @@
#endif
#include <hidapi.h>
#else
+#ifdef __FreeBSD__
+#include <libusb.h>
+#else
#include <libusb-1.0/libusb.h>
#endif
+#endif
struct SurviveViveData;