diff options
author | Leah Rowe <leah@libreboot.org> | 2023-05-30 16:02:25 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-05-30 16:02:25 +0100 |
commit | 83ecf2683382b11562ab4d4ec10c971b655950f2 (patch) | |
tree | 7fd116da3babc0ea7b0ae74234dce2ae71263f39 /util/spkmodem_recv | |
parent | 8df2f8095e11aa4995906856bf3d9396890c6dd5 (diff) |
util/*: Properly detect OpenBSD for pledge() call
The utils that are pledged checked HAVE_PLEDGE which was
bogus. OpenBSD defines __OpenBSD__, which you can check
for in ifdef.
This change makes nvmutil and spkmodem-recv *actually*
use pledge, when the utils are compiled on OpenBSD.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/spkmodem_recv')
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 30e13d8a..d13d8c7d 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -36,7 +36,7 @@ main(int argc, char *argv[]) { int c; -#ifdef HAVE_PLEDGE +#ifdef __OpenBSD__ if (pledge("stdio", NULL) == -1) err(errno, "pledge"); #endif |