From 580eaf6c8a6606f58221662166496c358dd127f7 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Wed, 4 Sep 2024 20:06:28 +0200 Subject: [PATCH] main: Actually include `prctl.h` on Linux --- main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index f1fcc62..790e6b2 100644 --- a/main.c +++ b/main.c @@ -11,6 +11,10 @@ #include #include +#if defined(__linux__) +# include +#endif + static char const* init_name = "flamingo"; static void usage(void) { @@ -20,7 +24,7 @@ static void usage(void) { char progname[16] = init_name; if (prctl(PR_GET_NAME, progname, NULL, NULL, NULL) < 0) { - fprintf(stderr, "prctl(PR_GET_NAME): %s", strerror(errno)) + fprintf(stderr, "prctl(PR_GET_NAME): %s", strerror(errno)); } #else char const* const progname = init_name;