summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/libreboot-utils/include/common.h')
-rw-r--r--util/libreboot-utils/include/common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h
index 0c8fbd3d..77672846 100644
--- a/util/libreboot-utils/include/common.h
+++ b/util/libreboot-utils/include/common.h
@@ -22,6 +22,10 @@
#include <sys/syscall.h>
#endif
+#ifdef __OpenBSD__ /* for pledge */
+#include <unistd.h>
+#endif
+
#define items(x) (sizeof((x)) / sizeof((x)[0]))
/* system prototypes
@@ -369,6 +373,8 @@ void write_mac_part(size_t partnum);
/* string functions
*/
+int xunveilx(const char *path, const char *permissions);
+int xpledgex(const char *promises, const char *execpromises);
int slen(const char *scmp, size_t maxlen,
size_t *rval);
int scmp(const char *a, const char *b,
@@ -391,7 +397,7 @@ void *rmalloc(size_t *size); /* don't ever use this */
void rset(void *buf, size_t n);
void *mkrbuf(size_t n);
char *mkrstr(size_t n);
-int win_lottery(char **buf);
+size_t rsize(size_t n);
/* Helper functions for command: dump
*/
@@ -537,7 +543,7 @@ int fs_rename_at(int olddirfd, const char *old,
int newdirfd, const char *new);
int fs_open(const char *path, int flags);
void close_no_err(int *fd);
-void free_if_null(char **buf);
+void free_and_set_null(char **buf);
int close_warn(int *fd, char *s);
struct filesystem *rootfs(void);
int fs_resolve_at(int dirfd, const char *path, int flags);