34 lines
832 B
Diff
34 lines
832 B
Diff
From 125669821d95ff989bf94161b8e2497bfca9d0ab Mon Sep 17 00:00:00 2001
|
|
From: q66 <daniel@octaforge.org>
|
|
Date: Wed, 29 Jan 2020 12:54:14 +0100
|
|
Subject: [PATCH 2/2] Use more portable page size check
|
|
|
|
This fixes musl builds.
|
|
---
|
|
libsrc/Dk/tlsf.h | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git libsrc/Dk/tlsf.h libsrc/Dk/tlsf.h
|
|
index ddce478..a9687f4 100644
|
|
--- libsrc/Dk/tlsf.h
|
|
+++ libsrc/Dk/tlsf.h
|
|
@@ -20,6 +20,7 @@
|
|
#define _TLSF_H_
|
|
|
|
#include <sys/types.h>
|
|
+#include <unistd.h>
|
|
|
|
extern size_t init_memory_pool(size_t, void *);
|
|
extern size_t get_used_size(void *);
|
|
@@ -159,7 +160,7 @@ extern void tlsf_base_free (void * c, size_t sz);
|
|
|
|
#define DEFAULT_AREA_SIZE (1024*10)
|
|
|
|
-#define PAGE_SIZE (getpagesize())
|
|
+#define PAGE_SIZE ((int)sysconf(_SC_PAGESIZE))
|
|
|
|
#ifndef WIN32
|
|
#ifdef USE_PRINTF
|
|
--
|
|
2.24.0
|
|
|