From: Thomas Frohwein Subject: Re: UPDATE: SDL2 - getexecpath() To: Brad Smith Cc: ports@openbsd.org, thfr@openbsd.org Date: Fri, 18 Sep 2026 10:02:28 -0700 On Fri, 18 Sep 2026 02:12:12 -0400 Brad Smith wrote: > +@@ -145,6 +145,15 @@ char *SDL_GetBasePath(void) > + } > + #endif > + #if defined(__OPENBSD__) > ++#ifdef HAVE_GETEXECPATH > ++ char fullpath[PATH_MAX]; > ++ if (getexecpath(fullpath, sizeof(fullpath)) == 0) { > ++ result = SDL_strdup(fullpath); ^^^^^^ > ++ if (!result) { ^^^^^^ Pretty sure from reading the code in this file that this needs to be "retval" instead of "result". That's what's defined at the beginning of the function and returned at the end. > ++ return NULL; > ++ } > ++ } > ++#else