From c2a1077b6afc95e50f6ef04fb678b2fd5ab81efe Mon Sep 17 00:00:00 2001 From: ahmedsamyh Date: Sat, 25 Jan 2025 19:41:37 +0500 Subject: [PATCH] [commonlib.h] Add missing linux headers. --- commonlib.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commonlib.h b/commonlib.h index 5d5312f..f397c73 100644 --- a/commonlib.h +++ b/commonlib.h @@ -112,6 +112,10 @@ typedef struct c_Arena c_Arena; // OS // +#if defined(__linux__) +#include +#endif + void c_os_get_timedate(c_Arena* a); bool c_os_file_exists(cstr filename); @@ -329,7 +333,6 @@ void* c_Arena_alloc(c_Arena* a, size_t size) { void* res = a->ptr; a->ptr = (uint8*)a->ptr + size; - // TODO: realloc buff with greater buff_size size_t diff = (size_t)((uint8*)a->ptr - (uint8*)a->buff); if (diff > a->buff_size) { c_log_info("c_Arena resized from %zu to %zu", a->buff_size, a->buff_size*2); -- 2.39.5