fix(windows): guard el_mem_check with _WIN32 — rusage is POSIX-only #60
Reference in New Issue
Block a user
Delete Branch "fix/windows-rusage-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
el_mem_checkfunction usesstruct rusageandgetrusage(), 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:Fix: Wrap the function body with
#ifdef _WIN32/#else/#endifso that on Windows it returns 0 immediately (memory guard disabled), and only the POSIX rusage path compiles on Linux/macOS.