From f7e49115c5be1b75423f88bce0a8a9cf643c9f57 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 31 Dec 2020 18:28:16 +0000
Subject: Fix building, no mlock/munlock for Haiku


diff --git a/libroar/libroar.c b/libroar/libroar.c
index 917d745..7505ff6 100644
--- a/libroar/libroar.c
+++ b/libroar/libroar.c
@@ -51,7 +51,7 @@ int roar_mm_mlock(const void *addr, size_t len) {
  return -1;
 #elif defined(ROAR_TARGET_MICROCONTROLLER)
  return 0;
-#elif defined(_SC_PAGESIZE)
+#elif defined(_SC_PAGESIZE) && !defined(__HAIKU__)
  long sz = sysconf(_SC_PAGESIZE);
  unsigned long int pos = (unsigned long int) addr;
 
@@ -76,7 +76,7 @@ int roar_mm_munlock(const void *addr, size_t len) {
  return -1;
 #elif defined(ROAR_TARGET_MICROCONTROLLER)
  return 0;
-#elif defined(_SC_PAGESIZE)
+#elif defined(_SC_PAGESIZE) && !defined(__HAIKU__)
  long sz = sysconf(_SC_PAGESIZE);
  unsigned long int pos = (unsigned long int) addr;
 
-- 
2.28.0

