mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
Add wrappers to reduce #ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
parent
c00d4753ae
commit
12e2c46d6a
5 changed files with 37 additions and 55 deletions
|
|
@ -161,6 +161,14 @@ int capsicum_open(const char *path, int flags, int mode)
|
|||
return (fd);
|
||||
}
|
||||
|
||||
int capsicum_open_wrapper(const char *path, int flags, int mode)
|
||||
{
|
||||
if (capsicum_enabled()) {
|
||||
return capsicum_open(path, flags, mode);
|
||||
}
|
||||
return open(path, flags, mode);
|
||||
}
|
||||
|
||||
void capsicum_mkdir_with_parents(const char *path, int mode)
|
||||
{
|
||||
char *component, *copy, *tofree;
|
||||
|
|
@ -201,6 +209,15 @@ void capsicum_mkdir_with_parents(const char *path, int mode)
|
|||
close(fd);
|
||||
}
|
||||
|
||||
void capsicum_mkdir_with_parents_wrapper(const char *path, int mode)
|
||||
{
|
||||
if (capsicum_enabled()) {
|
||||
capsicum_mkdir_with_parents(path, mode);
|
||||
return;
|
||||
}
|
||||
g_mkdir_with_parents(path, mode);
|
||||
}
|
||||
|
||||
nvlist_t *symbiont_connect(const nvlist_t *request)
|
||||
{
|
||||
nvlist_t *response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue