wok-next diff nss_ldap/stuff/patches/nss_ldap-265-glibc-2.16.patch @ rev 21686

updated glm (0.9.3.2 -> 0.9.9.8)
author Hans-G?nter Theisgen
date Mon Jun 29 16:57:49 2020 +0100 (2020-06-29)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nss_ldap/stuff/patches/nss_ldap-265-glibc-2.16.patch	Mon Jun 29 16:57:49 2020 +0100
     1.3 @@ -0,0 +1,136 @@
     1.4 +diff -u -r nss_ldap-265.orig/configure.in nss_ldap-265/configure.in
     1.5 +--- nss_ldap-265.orig/configure.in	2009-11-06 19:28:08.000000000 +0900
     1.6 ++++ nss_ldap-265/configure.in	2012-12-20 17:04:48.798942465 +0900
     1.7 +@@ -234,6 +234,7 @@
     1.8 + AC_CHECK_FUNCS(pthread_once)
     1.9 + AC_CHECK_FUNCS(ether_aton)
    1.10 + AC_CHECK_FUNCS(ether_ntoa)
    1.11 ++AC_CHECK_FUNCS(__libc_once __libc_atfork __libc_lock_lock __libc_lock_unlock)
    1.12 + 
    1.13 + AC_MSG_CHECKING(for struct ether_addr)
    1.14 + AC_TRY_COMPILE([#include <sys/types.h>
    1.15 +Only in nss_ldap-265: configure.in.orig
    1.16 +diff -u -r nss_ldap-265.orig/ldap-nss.c nss_ldap-265/ldap-nss.c
    1.17 +--- nss_ldap-265.orig/ldap-nss.c	2009-11-06 19:28:08.000000000 +0900
    1.18 ++++ nss_ldap-265/ldap-nss.c	2012-12-20 17:04:48.798942465 +0900
    1.19 +@@ -142,7 +142,7 @@
    1.20 +  */
    1.21 + static ldap_session_t __session = { NULL, NULL, 0, LS_UNINITIALIZED };
    1.22 + 
    1.23 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.24 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    1.25 + static pthread_once_t __once = PTHREAD_ONCE_INIT;
    1.26 + #endif
    1.27 + 
    1.28 +@@ -150,7 +150,7 @@
    1.29 + static FILE *__debugfile;
    1.30 + #endif /* LBER_OPT_LOG_PRINT_FILE */
    1.31 + 
    1.32 +-#ifndef HAVE_PTHREAD_ATFORK
    1.33 ++#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
    1.34 + /* 
    1.35 +  * Process ID that opened the session.
    1.36 +  */
    1.37 +@@ -162,7 +162,7 @@
    1.38 + static int __ssl_initialized = 0;
    1.39 + #endif /* HAVE_LDAPSSL_CLIENT_INIT */
    1.40 + 
    1.41 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.42 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    1.43 + /*
    1.44 +  * Prepare for fork(); lock mutex.
    1.45 +  */
    1.46 +@@ -513,7 +513,7 @@
    1.47 + }
    1.48 + #endif /* HAVE_NSSWITCH_H */
    1.49 + 
    1.50 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.51 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    1.52 + static void
    1.53 + do_atfork_prepare (void)
    1.54 + {
    1.55 +@@ -547,7 +547,7 @@
    1.56 + #ifdef HAVE_PTHREAD_ATFORK
    1.57 +   (void) pthread_atfork (do_atfork_prepare, do_atfork_parent,
    1.58 + 			 do_atfork_child);
    1.59 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.60 ++#elif defined(HAVE___LIBC_ATFORK)
    1.61 +   (void) __libc_atfork (do_atfork_prepare, do_atfork_parent, do_atfork_child);
    1.62 + #endif
    1.63 + 
    1.64 +@@ -1096,7 +1096,7 @@
    1.65 + do_init (void)
    1.66 + {
    1.67 +   ldap_config_t *cfg;
    1.68 +-#ifndef HAVE_PTHREAD_ATFORK
    1.69 ++#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
    1.70 +   pid_t pid;
    1.71 + #endif
    1.72 +   uid_t euid;
    1.73 +@@ -1113,7 +1113,7 @@
    1.74 +     }
    1.75 + 
    1.76 + #ifndef HAVE_PTHREAD_ATFORK
    1.77 +-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.78 ++#if defined(HAVE___LIBC_ONCE)
    1.79 +   /*
    1.80 +    * This bogosity is necessary because Linux uses different
    1.81 +    * PIDs for different threads (like IRIX, which we don't
    1.82 +@@ -1145,7 +1145,7 @@
    1.83 +     pid = -1;			/* linked against libpthreads, don't care */
    1.84 + #else
    1.85 +   pid = getpid ();
    1.86 +-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
    1.87 ++#endif /* HAVE___LIBC_ONCE */
    1.88 + #endif /* HAVE_PTHREAD_ATFORK */
    1.89 + 
    1.90 +   euid = geteuid ();
    1.91 +@@ -1155,7 +1155,7 @@
    1.92 +   syslog (LOG_DEBUG,
    1.93 + 	  "nss_ldap: __session.ls_state=%d, __session.ls_conn=%p, __euid=%i, euid=%i",
    1.94 + 	  __session.ls_state, __session.ls_conn, __euid, euid);
    1.95 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    1.96 ++#elif defined(HAVE___LIBC_ONCE)
    1.97 +   syslog (LOG_DEBUG,
    1.98 + 	  "nss_ldap: libpthreads=%s, __session.ls_state=%d, __session.ls_conn=%p, __pid=%i, pid=%i, __euid=%i, euid=%i",
    1.99 +  	  ((__pthread_once == NULL || __pthread_atfork == NULL) ? "FALSE" : "TRUE"),
   1.100 +@@ -1179,11 +1179,11 @@
   1.101 +     }
   1.102 +   else
   1.103 + #ifndef HAVE_PTHREAD_ATFORK
   1.104 +-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   1.105 ++#if defined(HAVE___LIBC_ONCE)
   1.106 +   if ((__pthread_once == NULL || __pthread_atfork == NULL) && __pid != pid)
   1.107 + #else
   1.108 +   if (__pid != pid)
   1.109 +-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
   1.110 ++#endif /* HAVE___LIBC_ONCE */
   1.111 +     {
   1.112 +       do_close_no_unbind ();
   1.113 +     }
   1.114 +@@ -1244,9 +1244,9 @@
   1.115 +       debug ("<== do_init (pthread_once failed)");
   1.116 +       return NSS_UNAVAIL;
   1.117 +     }
   1.118 +-#elif defined(HAVE_PTHREAD_ATFORK) && ( defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H) )
   1.119 ++#elif defined(HAVE_PTHREAD_ATFORK) && defined(HAVE___LIBC_ONCE)
   1.120 +   __libc_once (__once, do_atfork_setup);
   1.121 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   1.122 ++#elif defined(HAVE___LIBC_ONCE)
   1.123 +   /*
   1.124 +    * Only install the pthread_atfork() handlers i
   1.125 +    * we are linked against libpthreads. Otherwise,
   1.126 +Only in nss_ldap-265: ldap-nss.c.orig
   1.127 +diff -u -r nss_ldap-265.orig/ldap-nss.h nss_ldap-265/ldap-nss.h
   1.128 +--- nss_ldap-265.orig/ldap-nss.h	2009-11-06 19:28:08.000000000 +0900
   1.129 ++++ nss_ldap-265/ldap-nss.h	2012-12-20 17:04:48.798942465 +0900
   1.130 +@@ -670,7 +670,7 @@
   1.131 + #define NSS_LDAP_LOCK(m)		mutex_lock(&m)
   1.132 + #define NSS_LDAP_UNLOCK(m)		mutex_unlock(&m)
   1.133 + #define NSS_LDAP_DEFINE_LOCK(m)		static mutex_t m = DEFAULTMUTEX
   1.134 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   1.135 ++#elif defined(HAVE___LIBC_LOCK_LOCK) && defined(HAVE___LIBC_LOCK_UNLOCK)
   1.136 + #define NSS_LDAP_LOCK(m)		__libc_lock_lock(m)
   1.137 + #define NSS_LDAP_UNLOCK(m)		__libc_lock_unlock(m)
   1.138 + #define NSS_LDAP_DEFINE_LOCK(m)		static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER
   1.139 +Only in nss_ldap-265: ldap-nss.h.orig