Packages that include the 'relocatable-prog' module show a syntax error
when configured with --enable-relocatable on Linux:
progreloc.c: In function ‘find_executable’:
progreloc.c:264:29: error: ‘buf’ undeclared (first use in this function)
264 | executable_fd = open (buf, O_EXEC | O_CLOEXEC, 0);
| ^~~
This patch fixes it.
2026-01-29 Bruno Haible <[email protected]>
relocatable-prog-wrapper: Fix syntax error on Linux (regr. 2025-12-09).
Reported by Erik Schnetter <[email protected]>
at <https://savannah.gnu.org/bugs/?67987>.
* lib/progreloc.c (find_executable): Remove extraneous brace.
diff --git a/lib/progreloc.c b/lib/progreloc.c
index bac7cd0096..3596043171 100644
--- a/lib/progreloc.c
+++ b/lib/progreloc.c
@@ -259,7 +259,6 @@ find_executable (const char *argv0)
char *link = xreadlink (buf);
if (link != NULL && link[0] != '[')
return link;
- }
if (executable_fd < 0)
executable_fd = open (buf, O_EXEC | O_CLOEXEC, 0);
}