Linux build: hos_paths.h includes the POSIX windows.h for its Linux hos_game_path_a #642

Merged
hckrman101 merged 1 commit from linux-hos-paths into main 2026-11-08 15:37:14 +00:00
hckrman101 commented 2026-11-08 15:28:25 +00:00 (Migrated from github.com)

Since 81f2084 ("Game folder: hookshot.exe is the launcher; the game and its DLLs are in bin\") the Linux build stops in every host file that includes hos_paths.h before <windows.h> (hos_main.c, mods.c, nn_applet.c, ...):

host/hos_paths.h:53:15: error: unknown type name 'DWORD'
host/posix/windows.h:345:7: error: conflicting types for 'GetModuleFileNameA'

The header's #ifdef _WIN32 branch includes <windows.h>, but the Linux branch uses DWORD and GetModuleFileNameA without it. The Linux branch now includes <windows.h> too (on Linux that is host/posix's, which has an include guard), so the order of includes in the .c files no longer matters. Windows is unchanged.

Tested: a full Linux build of current main with this change completes and the game reaches play.

Since 81f2084 ("Game folder: hookshot.exe is the launcher; the game and its DLLs are in bin\\") the Linux build stops in every host file that includes `hos_paths.h` before `<windows.h>` (hos_main.c, mods.c, nn_applet.c, ...): ``` host/hos_paths.h:53:15: error: unknown type name 'DWORD' host/posix/windows.h:345:7: error: conflicting types for 'GetModuleFileNameA' ``` The header's `#ifdef _WIN32` branch includes `<windows.h>`, but the Linux branch uses `DWORD` and `GetModuleFileNameA` without it. The Linux branch now includes `<windows.h>` too (on Linux that is host/posix's, which has an include guard), so the order of includes in the .c files no longer matters. Windows is unchanged. Tested: a full Linux build of current main with this change completes and the game reaches play.
Commenting is not possible because the repository is archived.
No description provided.