Index | Thread | Search

From:
Klemens Nanni <kn@openbsd.org>
Subject:
Re: UPDATE: x11/lemonbar
To:
Ingo Feinerer <feinerer@logic.at>, ports@openbsd.org
Date:
Sun, 25 Aug 2024 10:13:22 +0000

Download raw body.

Thread
25.08.2024 09:41, Ingo Feinerer пишет:
> Hi,
> 
> update x11/lemonbar 1.4 -> 1.5
> 
> - Upstream now has pledge() but uses err() which is undeclared.
>   So keep and modify the patch.
> 
> - Drop MAINTAINER.
> 
> OK?

No lemonbar user, but...

> +@@ -1457,7 +1457,8 @@ main (int argc, char **argv)
> + 
> + #ifdef __OpenBSD__
> +     if (pledge("stdio rpath", NULL) < 0) {
> +-        err(EXIT_FAILURE, "pledge failed");
> ++        fprintf(stderr, "pledge failed\n");
> ++        exit(EXIT_FAILURE);

You ignore errno here.

You can also #include <err.h> and leave the code as-is;
probably depends on upstream style, but either way, errno must not be lost.

> +     }
> + #endif
>   
> -     for (;;) {
> -         bool redraw = false;
>