mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-12 12:19:10 +00:00
pledge for xclock. okan@ got to the same patch. I added autoconf goo
to make it possible to send it upstreams. ok deraadt@
This commit is contained in:
@@ -39,7 +39,7 @@ AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
||||
|
||||
AC_CHECK_FUNCS([strlcpy getpid])
|
||||
AC_CHECK_FUNCS([strlcpy getpid pledge])
|
||||
|
||||
AM_ICONV
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@ in this Software without prior written authorization from The Open Group.
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PLEDGE
|
||||
# include <err.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
@@ -224,6 +227,11 @@ main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PLEDGE
|
||||
if (pledge("stdio", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
#endif
|
||||
|
||||
XtAppMainLoop (app_con);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user