diff --git a/src/packages/compat/IZ_compat.h b/src/packages/compat/IZ_compat.h index 6fbf31e..52383d4 100644 --- a/src/packages/compat/IZ_compat.h +++ b/src/packages/compat/IZ_compat.h @@ -7,6 +7,7 @@ #endif #if defined IZ_UNIX +typedef unsigned long size_t; typedef size_t rsize_t; typedef int errno_t; #endif diff --git a/src/packages/game/IZ_app_net.c b/src/packages/game/IZ_app_net.c index 53e88ec..780afbd 100644 --- a/src/packages/game/IZ_app_net.c +++ b/src/packages/game/IZ_app_net.c @@ -3,7 +3,7 @@ void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_raw, size_t len) { u8* binary = binary_raw; size_t i; - printf("%llu: Binary", IZ_AppGetTicks(app)); + printf("%lu: Binary", IZ_AppGetTicks(app)); for (i = 0; i < len; i += 1) { printf("%c%02x", i == 0 ? '(' : ' ', binary[i]); } @@ -11,7 +11,7 @@ void IZ_AppHandleNetworkingInboundBinaryEvents(struct IZ_App* app, void* binary_ } void IZ_AppHandleNetworkingInboundTextEvents(struct IZ_App* app, const char* text, size_t len) { - printf("%llu: String(%s)\n", IZ_AppGetTicks(app), text); + printf("%lu: String(%s)\n", IZ_AppGetTicks(app), text); } void IZ_AppHandleOutboundNetworking(struct IZ_App* app) { diff --git a/src/packages/game/data/IZ_list.c b/src/packages/game/data/IZ_list.c index e8eb82e..1dd2538 100644 --- a/src/packages/game/data/IZ_list.c +++ b/src/packages/game/data/IZ_list.c @@ -57,7 +57,7 @@ void IZ_ListPrintNodeValues(IZ_List* list) { u64 index = 0; printf("\nlist@%p\n", list); do { - printf(" %llu@%p:%u\n", index, *list->iterator, *((unsigned int*)(*list->iterator)->value)); + printf(" %lu@%p:%u\n", index, *list->iterator, *((unsigned int*)(*list->iterator)->value)); index += 1; list->iterator = &(*list->iterator)->next; } while (*list->iterator); diff --git a/src/packages/game/memory/IZ_pool.c b/src/packages/game/memory/IZ_pool.c index 5d624cb..6fa6795 100644 --- a/src/packages/game/memory/IZ_pool.c +++ b/src/packages/game/memory/IZ_pool.c @@ -26,7 +26,7 @@ IZ_PoolItem* IZ_PoolAllocate(IZ_Pool* pool, IZ_PoolAllocationArgs args) { // TODO deallocate memory based from priority } - void* pointer = &pool->memory[pool->next_address]; + void* pointer = &((u8*) pool->memory)[pool->next_address]; IZ_ListNode* new_item; IZ_ListAppendNode(&pool->items, &(IZ_PoolItem) { .pointer = pointer, diff --git a/src/packages/log/IZ_log.h b/src/packages/log/IZ_log.h index 0f4b78e..ee628d4 100644 --- a/src/packages/log/IZ_log.h +++ b/src/packages/log/IZ_log.h @@ -21,6 +21,8 @@ #include #elif defined IZ_MACOS #include +#elif defined IZ_UNIX +#include #endif #include "../compat/IZ_compat.h" diff --git a/src/packages/stdinc/IZ_string.h b/src/packages/stdinc/IZ_string.h index af05e73..8bd7001 100644 --- a/src/packages/stdinc/IZ_string.h +++ b/src/packages/stdinc/IZ_string.h @@ -7,6 +7,8 @@ #include #elif defined IZ_MACOS #include +#elif defined IZ_UNIX +#include "../../src/packages/compat/IZ_compat.h" #endif errno_t IZ_memcpy(void*, rsize_t, const void*, rsize_t); diff --git a/src/packages/timer/IZ_timer.c b/src/packages/timer/IZ_timer.c index aef99c4..9700f8a 100644 --- a/src/packages/timer/IZ_timer.c +++ b/src/packages/timer/IZ_timer.c @@ -40,7 +40,7 @@ unsigned int IZ_TimerElapsedRaw() { * @sa IZ_TimerElapsedRaw() */ char* IZ_TimerElapsed() { - static char buffer[32]; + static char buffer[48]; struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); unsigned int seconds = t.tv_sec - IZ_TIMER_START_TIMESTAMP; @@ -58,7 +58,7 @@ char* IZ_TimerElapsed() { char* IZ_TimerNow() { struct timespec t; clock_gettime(CLOCK_REALTIME, &t); - static char buffer[32]; + static char buffer[48]; unsigned int seconds = t.tv_sec; unsigned int milliseconds = t.tv_nsec / 1000000; static char formatted[32]; @@ -75,7 +75,7 @@ char* IZ_TimerNow() { char* IZ_TimerNowPathSafe() { struct timespec t; clock_gettime(CLOCK_REALTIME, &t); - static char buffer[32]; + static char buffer[48]; unsigned int seconds = t.tv_sec; unsigned int milliseconds = t.tv_nsec / 1000000; static char formatted[32];