On Sun, Feb 17, 2019 at 10:36:42AM +0200, Timo Myyrä wrote:
> For some reason the compilation gives warning on pledge although unistd.h is 
> included:
> lemonbar.c:1541:9: warning: implicit declaration of function 'pledge' is 
> invalid in C99 [-Wimplicit-function-declaration]
>     if (pledge("stdio", NULL) == -1)
>         ^
> 1 warning generated.

That is because of

#define _POSIX_C_SOURCE 200809L

in lemonbar.c

pledge() still works (in my tests I tried the pledge() call at different
earlier positions which lead to program termination) so I just ignored
this warning.

Reply via email to