Jordon <open...@sirjorj.com> writes:

> What is the “official" way to pledge(2) a portable program?
>
> Put #ifdef __OpenBSD__ around the pledge call?
>
> Make an #ifndef __OpenBSD__ block that defined the function to always
return
> 0?

This kind of tests harm portability in the long run.

> Something better?

How about: detect whether pledge(2) is available.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to