Created
May 21, 2021 23:37
-
-
Save justinmeiners/278b22ea131380d53b086fde7c5a3edd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this shows the preprocessor you can use to detect whether to try pledge or not | |
// | |
#ifdef __OpenBSD__ | |
#define HAS_PLEDGE 1 | |
#endif | |
#ifdef HAS_PLEDGE | |
if (pledge("stdio", NULL) == -1) | |
{ | |
return 1; | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment