Blame SOURCES/libgpg-error-1.29-multilib.patch

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