7bf0b86
diff -up libgpg-error-1.29/configure.ac.multilib libgpg-error-1.29/configure.ac
7bf0b86
--- libgpg-error-1.29/configure.ac.multilib	2018-04-11 14:41:10.479019981 +0200
7bf0b86
+++ libgpg-error-1.29/configure.ac	2018-04-11 14:43:31.288394113 +0200
7bf0b86
@@ -215,13 +215,13 @@ GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
7bf0b86
 
aec7790
 
aec7790
 # Find a 64 bit integer type to be used instead of off_t.  We prefer
aec7790
-# the standard integer types over int64_t and finally try long long.
aec7790
-if test "$ac_cv_sizeof_int" = "8"; then
aec7790
+# int64_t and finally try long long.
aec7790
+if test "$ac_cv_header_stdint_h" = yes; then
aec7790
+   replacement_for_off_t="int64_t"
aec7790
+elif test "$ac_cv_sizeof_int" = "8"; then
aec7790
    replacement_for_off_t="int"
aec7790
 elif test "$ac_cv_sizeof_long" = "8"; then
aec7790
    replacement_for_off_t="long"
aec7790
-elif test "$ac_cv_header_stdint_h" = yes; then
aec7790
-   replacement_for_off_t="int64_t"
aec7790
 elif test "$ac_cv_sizeof_long_long" = "8"; then
aec7790
    replacement_for_off_t="long long"
aec7790
 else
7bf0b86
diff -up libgpg-error-1.29/configure.multilib libgpg-error-1.29/configure
7bf0b86
--- libgpg-error-1.29/configure.multilib	2018-04-11 09:34:30.000000000 +0200
7bf0b86
+++ libgpg-error-1.29/configure	2018-04-11 14:41:10.481020028 +0200
7bf0b86
@@ -11301,7 +11301,7 @@ shlibpath_var=
aec7790
 shlibpath_overrides_runpath=unknown
aec7790
 version_type=none
aec7790
 dynamic_linker="$host_os ld.so"
aec7790
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
aec7790
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64 /usr/lib64"
aec7790
 need_lib_prefix=unknown
aec7790
 hardcode_into_libs=no
aec7790
 
7bf0b86
@@ -11775,7 +11775,7 @@ fi
4ab64fa
   # appending ld.so.conf contents (and includes) to the search path.
aec7790
   if test -f /etc/ld.so.conf; then
aec7790
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
aec7790
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
aec7790
+    sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64 /usr/lib64 $lt_ld_extra"
aec7790
   fi
aec7790
 
aec7790
   # We used to test for /lib/ld.so.1 and disable shared libraries on
7bf0b86
@@ -15879,12 +15879,12 @@ fi
aec7790
 
aec7790
 # Find a 64 bit integer type to be used instead of off_t.  We prefer
aec7790
 # the standard integer types over int64_t and finally try long long.
aec7790
-if test "$ac_cv_sizeof_int" = "8"; then
aec7790
+if test "$ac_cv_header_stdint_h" = yes; then
aec7790
+   replacement_for_off_t="int64_t"
aec7790
+elif test "$ac_cv_sizeof_int" = "8"; then
aec7790
    replacement_for_off_t="int"
aec7790
 elif test "$ac_cv_sizeof_long" = "8"; then
aec7790
    replacement_for_off_t="long"
aec7790
-elif test "$ac_cv_header_stdint_h" = yes; then
aec7790
-   replacement_for_off_t="int64_t"
aec7790
 elif test "$ac_cv_sizeof_long_long" = "8"; then
aec7790
    replacement_for_off_t="long long"
aec7790
 else
7bf0b86
diff -up libgpg-error-1.29/src/gen-posix-lock-obj.c.multilib libgpg-error-1.29/src/gen-posix-lock-obj.c
7bf0b86
--- libgpg-error-1.29/src/gen-posix-lock-obj.c.multilib	2016-11-16 13:22:03.000000000 +0100
7bf0b86
+++ libgpg-error-1.29/src/gen-posix-lock-obj.c	2018-04-11 14:41:10.481020028 +0200
037c370
@@ -72,6 +72,7 @@ main (void)
1d7564e
 #ifdef USE_POSIX_THREADS
aec7790
   unsigned char *p;
aec7790
   int i;
aec7790
+  int initidx = 0;
1d7564e
 #endif
aec7790
   struct {
aec7790
     long vers;
037c370
@@ -111,11 +112,12 @@ main (void)
1d7564e
 
1d7564e
   /* To force a probably suitable alignment of the structure we use a
1d7564e
      union and include a long and a pointer to a long.  */
1d7564e
-  printf ("typedef struct\n"
1d7564e
+  printf ("#include <pthread.h>\n"
1d7564e
+          "typedef struct\n"
aec7790
           "{\n"
aec7790
           "  long _vers;\n"
aec7790
           "  union {\n"
aec7790
-          "    volatile char _priv[%d];\n"
aec7790
+          "    volatile char _priv[sizeof(pthread_mutex_t)];\n"
aec7790
           "%s"
aec7790
           "    long _x_align;\n"
aec7790
           "    long *_xp_align;\n"
037c370
@@ -123,7 +125,6 @@ main (void)
1d7564e
           "} gpgrt_lock_t;\n"
aec7790
           "\n"
aec7790
           "#define GPGRT_LOCK_INITIALIZER {%d,{{",
aec7790
-          SIZEOF_PTHREAD_MUTEX_T,
1d7564e
 # if USE_16BYTE_ALIGNMENT
aec7790
           "    int _x16_align __attribute__ ((aligned (16)));\n",
037c370
 # elif USE_DOUBLE_FOR_ALIGNMENT
037c370
@@ -137,10 +138,16 @@ main (void)
aec7790
   p = (unsigned char *)&mt;;
aec7790
   for (i=0; i < sizeof mtx; i++)
aec7790
     {
aec7790
+      if (p[i] != 0)
aec7790
+        initidx = i;
aec7790
+    }
aec7790
+
aec7790
+  for (i=0; i <= initidx; i++)
aec7790
+    {
aec7790
       if (i && !(i % 8))
aec7790
         printf (" \\\n%*s", 36, "");
aec7790
       printf ("%u", p[i]);
aec7790
-      if (i < sizeof mtx - 1)
aec7790
+      if (i < initidx)
aec7790
         putchar (',');
aec7790
     }
1d7564e
   fputs ("}}}\n", stdout);
7bf0b86
diff -up libgpg-error-1.29/src/gpg-error.h.in.multilib libgpg-error-1.29/src/gpg-error.h.in
7bf0b86
--- libgpg-error-1.29/src/gpg-error.h.in.multilib	2018-04-11 14:41:10.481020028 +0200
7bf0b86
+++ libgpg-error-1.29/src/gpg-error.h.in	2018-04-11 14:45:28.184203566 +0200
7bf0b86
@@ -17,7 +17,7 @@
037c370
  * License along with this program; if not, see <https://www.gnu.org/licenses/>.
73e39e7
  * SPDX-License-Identifier: LGPL-2.1-or-later
1d7564e
  *
1d7564e
- * @configure_input@
1d7564e
+ * Do not edit.  Generated from gpg-error.h.in.
aec7790
  */
aec7790
 
7bf0b86
 /* The GnuPG project consists of many components.  Error codes are