Skip to content

Commit 89eb42b

Browse files
dkruceslucasdemarchi
authored andcommitted
drm/xe: xe_gen_wa_oob: replace program_invocation_short_name
program_invocation_short_name may not be available in other systems. Instead, replace it with the argv[0] to pass the executable name. Fixes build error when program_invocation_short_name is not available: drivers/gpu/drm/xe/xe_gen_wa_oob.c:34:3: error: use of undeclared identifier 'program_invocation_short_name' 34 | program_invocation_short_name); | ^ 1 error generated. Suggested-by: Masahiro Yamada <[email protected]> Signed-off-by: Daniel Gomez <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent dd8c01e commit 89eb42b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/xe/xe_gen_wa_oob.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
"\n" \
2929
"#endif\n"
3030

31-
static void print_usage(FILE *f)
31+
static void print_usage(FILE *f, const char *progname)
3232
{
3333
fprintf(f, "usage: %s <input-rule-file> <generated-c-source-file> <generated-c-header-file>\n",
34-
program_invocation_short_name);
34+
progname);
3535
}
3636

3737
static void print_parse_error(const char *err_msg, const char *line,
@@ -144,7 +144,7 @@ int main(int argc, const char *argv[])
144144

145145
if (argc < 3) {
146146
fprintf(stderr, "ERROR: wrong arguments\n");
147-
print_usage(stderr);
147+
print_usage(stderr, argv[0]);
148148
return 1;
149149
}
150150

0 commit comments

Comments
 (0)