From e7e16777869430390ebbac7c788b688ff5e94454 Mon Sep 17 00:00:00 2001 From: Henry Ford Date: Tue, 21 Nov 2023 14:59:09 -0500 Subject: [PATCH] engine: common: comply with C89 in OpenBSD wai_getExecutablePath --- engine/common/whereami.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/common/whereami.c b/engine/common/whereami.c index 1d79c72a..cbd5e66f 100644 --- a/engine/common/whereami.c +++ b/engine/common/whereami.c @@ -632,12 +632,14 @@ int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length) else { const char* PATH = getenv("PATH"); + const char* begin; + size_t argv0_length; if (!PATH) break; - size_t argv0_length = strlen(argv[0]); + argv0_length = strlen(argv[0]); - const char* begin = PATH; + begin = PATH; while (1) { const char* separator = strchr(begin, ':');