diff --git a/src/adverb.c b/src/adverb.c
index 5fe9f098cdaef12d3b51acc08dbe6f551e540179..c6599b2c3a0436549ffb64d65d593214244c7ed3 100644
--- a/src/adverb.c
+++ b/src/adverb.c
@@ -155,7 +155,7 @@ generate_locales (gchar **locpath_out,
     }
 
   this_path = g_file_read_link ("/proc/self/exe", NULL);
-  this_dir = g_dirname (this_path);
+  this_dir = g_path_get_dirname (this_path);
   pvlg = g_build_filename (this_dir, "pressure-vessel-locale-gen", NULL);
 
   const char *locale_gen_argv[] =