Description: Strip the multiarch tuple when looking for the installation path.
Author: Bertrand Marc <beberking@gmail.com>
Forwarded: no
Last-Update: 2014-01-27

--- gnunet-0.9.5a.orig/src/util/os_installation.c
+++ gnunet-0.9.5a/src/util/os_installation.c
@@ -490,7 +490,20 @@ GNUNET_OS_installation_get_path (enum GN
     execpath[--n] = '\0';
 
   isbasedir = 1;
-  if ((n > 5) &&
+  if ((n > 20) &&
+      (0 == strcasecmp (&execpath[n - 20], "lib/x86_64-linux-gnu")))
+  {
+    if ( (GNUNET_OS_IPK_LIBDIR != dirkind) &&
+	 (GNUNET_OS_IPK_LIBEXECDIR != dirkind) )
+    {
+      /* strip the multiarch tuple */
+      execpath[n - 20] = '\0';
+      n -= 20;
+    }
+    else
+      isbasedir = 0;
+  }
+  else if ((n > 5) &&
       ((0 == strcasecmp (&execpath[n - 5], "lib32")) ||
        (0 == strcasecmp (&execpath[n - 5], "lib64"))))
   {
