From 5a2f8e292624cc3bccbe7c513fac0b753ef10249 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 5 Oct 2025 14:37:45 -0600 Subject: [PATCH] Docker build fixes --- .dockerignore | 2 ++ dll/kernel32/processthreadsapi.cpp | 5 ++++- src/main.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5d22764..ded8c7a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ +.cache/ .git/ .vscode/ build/ +tmp/ diff --git a/dll/kernel32/processthreadsapi.cpp b/dll/kernel32/processthreadsapi.cpp index 451b8ad..a8c2bbf 100644 --- a/dll/kernel32/processthreadsapi.cpp +++ b/dll/kernel32/processthreadsapi.cpp @@ -498,8 +498,11 @@ HANDLE WIN_FUNC CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dw pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (dwStackSize != 0) { +#ifdef PTHREAD_STACK_MIN + dwStackSize = std::max(dwStackSize, static_cast(PTHREAD_STACK_MIN)); +#endif // TODO: should we just ignore this? - pthread_attr_setstacksize(&attr, std::max(dwStackSize, static_cast(PTHREAD_STACK_MIN))); + pthread_attr_setstacksize(&attr, dwStackSize); } int rc = pthread_create(&obj->thread, &attr, threadTrampoline, startData); diff --git a/src/main.cpp b/src/main.cpp index 98f8b5c..ae44743 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -362,7 +362,8 @@ int main(int argc, char **argv) { } // Resolve the guest program path - std::filesystem::path resolvedGuestPath = wibo::resolveExecutable(programName, true).value_or({}); + std::filesystem::path resolvedGuestPath = + wibo::resolveExecutable(programName, true).value_or(std::filesystem::path{}); if (resolvedGuestPath.empty()) { fprintf(stderr, "Failed to resolve path to guest program %s\n", programName.c_str()); return 1;