codemem: also try XDG_RUNTIME_DIR before falling back on HOME
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 30 Jun 2011 16:42:24 +0000 (17:42 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 30 Jun 2011 16:42:52 +0000 (17:42 +0100)
orc/orccodemem.c

index 8c732f1..032f7fc 100644 (file)
@@ -266,6 +266,10 @@ orc_code_region_allocate_codemem (OrcCodeRegion *region)
   if (orc_code_region_allocate_codemem_dual_map (region,
         "/tmp", FALSE)) return;
 
+  tmpdir = getenv ("XDG_RUNTIME_DIR");
+  if (tmpdir && orc_code_region_allocate_codemem_dual_map (region,
+        tmpdir, FALSE)) return;
+
   tmpdir = getenv ("HOME");
   if (tmpdir && orc_code_region_allocate_codemem_dual_map (region,
         tmpdir, FALSE)) return;