diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/update-desktop-database.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f342196..633d9e3 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,8 @@ AM_CONFIG_HEADER(config.h) AC_PROG_LN_S AC_PROG_CC +AC_CHECK_FUNCS(pledge) + if test "x$GCC" = "xyes"; then changequote(,)dnl case " $CFLAGS " in diff --git a/src/update-desktop-database.c b/src/update-desktop-database.c index 7f48357..ce4d8c8 100644 --- a/src/update-desktop-database.c +++ b/src/update-desktop-database.c @@ -450,6 +450,13 @@ main (int argc, { NULL } }; +#if HAVE_PLEDGE + if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) { + g_printerr ("pledge\n"); + return 1; + } +#endif + context = g_option_context_new (""); g_option_context_set_summary (context, _("Build cache database of MIME types handled by desktop files.")); g_option_context_add_main_entries (context, options, NULL); |