diff options
Diffstat (limited to 'libmenu/entry-directories.c')
-rw-r--r-- | libmenu/entry-directories.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libmenu/entry-directories.c b/libmenu/entry-directories.c index 33b68eb..3970c95 100644 --- a/libmenu/entry-directories.c +++ b/libmenu/entry-directories.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2002 - 2004 Red Hat, Inc. + * Copyright (C) 2012-2021 MATE Developers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,6 +18,9 @@ * Boston, MA 02110-1301, USA. */ +/* used for realpath() */ +#define _XOPEN_SOURCE 500 + #include <config.h> #include "entry-directories.h" @@ -398,8 +402,8 @@ static gboolean cached_dir_remove_subdir(CachedDir* dir, const char* basename) { subdir->deleted = TRUE; - cached_dir_unref (subdir); dir->subdirs = g_slist_remove (dir->subdirs, subdir); + cached_dir_unref (subdir); return TRUE; } @@ -863,7 +867,7 @@ typedef gboolean (*EntryDirectoryForeachFunc) (EntryDirectory* ed, DesktopEntry* static gboolean entry_directory_foreach_recursive(EntryDirectory* ed, CachedDir* cd, GString* relative_path, EntryDirectoryForeachFunc func, DesktopEntrySet* set, gpointer user_data) { GSList *tmp; - int relative_path_len; + gsize relative_path_len; if (cd->deleted) return TRUE; |