Reading this reminds me of the days in the 90s when programs could target 10+ different Unix systems and shipped as giant tar balls of code. The C code consisted of giant #ifdef <UNIX VENDOR> blocks to accommodate how different Unix systems might handle a couple system calls.
It wasn't uncommon for the wrong block of code to get included so you had to figure out how the compile target's system call worked, how your system's system call worked and modify the code accordingly to get it to compile (and hope it worked). This was the 1990s so getting code to compile on Linux wasn't a high priority (since Linux was still in its infancy).
Fun times.