fix(windows): guard el_mem_check with _WIN32 — rusage is POSIX-only #60

Merged
will.anderson merged 1 commits from fix/windows-rusage-guard into stage 2026-06-25 16:48:21 +00:00
Owner

The el_mem_check function uses struct rusage and getrusage(), which are POSIX-only. The file already gates POSIX includes (<sys/resource.h>) behind #ifndef _WIN32, but the function body had no matching guard, causing the Windows build to fail with:

_el_runtime.c:5891:19: error: storage size of 'ru' isn't known

Fix: Wrap the function body with #ifdef _WIN32 / #else / #endif so that on Windows it returns 0 immediately (memory guard disabled), and only the POSIX rusage path compiles on Linux/macOS.

The `el_mem_check` function uses `struct rusage` and `getrusage()`, which are POSIX-only. The file already gates POSIX includes (`<sys/resource.h>`) behind `#ifndef _WIN32`, but the function body had no matching guard, causing the Windows build to fail with: ``` _el_runtime.c:5891:19: error: storage size of 'ru' isn't known ``` **Fix:** Wrap the function body with `#ifdef _WIN32` / `#else` / `#endif` so that on Windows it returns 0 immediately (memory guard disabled), and only the POSIX rusage path compiles on Linux/macOS.
will.anderson added 1 commit 2026-06-25 16:46:17 +00:00
fix(windows): guard el_mem_check with _WIN32 — rusage is POSIX-only
El SDK CI - stage / build-and-test (pull_request) Failing after 11m3s
93d36fddb1
will.anderson merged commit 5c41c66a0f into stage 2026-06-25 16:48:21 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: neuron-technologies/el#60