wok-next rev 20351

nss_ldap: add glibc-2.16.patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 18 22:23:47 2017 +0100 (2017-11-18)
parents 4d58cc2186c2
children f28887496a5e
files network-manager/receipt nss_ldap/stuff/patches/nss_ldap-265-glibc-2.16.patch nss_ldap/stuff/patches/series
line diff
     1.1 --- a/network-manager/receipt	Sat Nov 18 19:13:49 2017 +0100
     1.2 +++ b/network-manager/receipt	Sat Nov 18 22:23:47 2017 +0100
     1.3 @@ -18,6 +18,10 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 +	sed -i '/expires > 0)$/{p;s/.*/{/;NNN;s/$/\n}/}' \
     1.8 +		src/ip6-manager/nm-ip6-manager.c
     1.9 +	sed -i 's/.\(if (.nm_supplicant_config_add_setting_8021x\)/    \1/' \
    1.10 +		src/supplicant-manager/nm-supplicant-config.c
    1.11  	./configure \
    1.12  		--prefix=/usr \
    1.13  		--libexecdir=/usr/lib/$PACKAGE \
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/nss_ldap/stuff/patches/nss_ldap-265-glibc-2.16.patch	Sat Nov 18 22:23:47 2017 +0100
     2.3 @@ -0,0 +1,136 @@
     2.4 +diff -u -r nss_ldap-265.orig/configure.in nss_ldap-265/configure.in
     2.5 +--- nss_ldap-265.orig/configure.in	2009-11-06 19:28:08.000000000 +0900
     2.6 ++++ nss_ldap-265/configure.in	2012-12-20 17:04:48.798942465 +0900
     2.7 +@@ -234,6 +234,7 @@
     2.8 + AC_CHECK_FUNCS(pthread_once)
     2.9 + AC_CHECK_FUNCS(ether_aton)
    2.10 + AC_CHECK_FUNCS(ether_ntoa)
    2.11 ++AC_CHECK_FUNCS(__libc_once __libc_atfork __libc_lock_lock __libc_lock_unlock)
    2.12 + 
    2.13 + AC_MSG_CHECKING(for struct ether_addr)
    2.14 + AC_TRY_COMPILE([#include <sys/types.h>
    2.15 +Only in nss_ldap-265: configure.in.orig
    2.16 +diff -u -r nss_ldap-265.orig/ldap-nss.c nss_ldap-265/ldap-nss.c
    2.17 +--- nss_ldap-265.orig/ldap-nss.c	2009-11-06 19:28:08.000000000 +0900
    2.18 ++++ nss_ldap-265/ldap-nss.c	2012-12-20 17:04:48.798942465 +0900
    2.19 +@@ -142,7 +142,7 @@
    2.20 +  */
    2.21 + static ldap_session_t __session = { NULL, NULL, 0, LS_UNINITIALIZED };
    2.22 + 
    2.23 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.24 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    2.25 + static pthread_once_t __once = PTHREAD_ONCE_INIT;
    2.26 + #endif
    2.27 + 
    2.28 +@@ -150,7 +150,7 @@
    2.29 + static FILE *__debugfile;
    2.30 + #endif /* LBER_OPT_LOG_PRINT_FILE */
    2.31 + 
    2.32 +-#ifndef HAVE_PTHREAD_ATFORK
    2.33 ++#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
    2.34 + /* 
    2.35 +  * Process ID that opened the session.
    2.36 +  */
    2.37 +@@ -162,7 +162,7 @@
    2.38 + static int __ssl_initialized = 0;
    2.39 + #endif /* HAVE_LDAPSSL_CLIENT_INIT */
    2.40 + 
    2.41 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.42 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    2.43 + /*
    2.44 +  * Prepare for fork(); lock mutex.
    2.45 +  */
    2.46 +@@ -513,7 +513,7 @@
    2.47 + }
    2.48 + #endif /* HAVE_NSSWITCH_H */
    2.49 + 
    2.50 +-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.51 ++#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
    2.52 + static void
    2.53 + do_atfork_prepare (void)
    2.54 + {
    2.55 +@@ -547,7 +547,7 @@
    2.56 + #ifdef HAVE_PTHREAD_ATFORK
    2.57 +   (void) pthread_atfork (do_atfork_prepare, do_atfork_parent,
    2.58 + 			 do_atfork_child);
    2.59 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.60 ++#elif defined(HAVE___LIBC_ATFORK)
    2.61 +   (void) __libc_atfork (do_atfork_prepare, do_atfork_parent, do_atfork_child);
    2.62 + #endif
    2.63 + 
    2.64 +@@ -1096,7 +1096,7 @@
    2.65 + do_init (void)
    2.66 + {
    2.67 +   ldap_config_t *cfg;
    2.68 +-#ifndef HAVE_PTHREAD_ATFORK
    2.69 ++#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
    2.70 +   pid_t pid;
    2.71 + #endif
    2.72 +   uid_t euid;
    2.73 +@@ -1113,7 +1113,7 @@
    2.74 +     }
    2.75 + 
    2.76 + #ifndef HAVE_PTHREAD_ATFORK
    2.77 +-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.78 ++#if defined(HAVE___LIBC_ONCE)
    2.79 +   /*
    2.80 +    * This bogosity is necessary because Linux uses different
    2.81 +    * PIDs for different threads (like IRIX, which we don't
    2.82 +@@ -1145,7 +1145,7 @@
    2.83 +     pid = -1;			/* linked against libpthreads, don't care */
    2.84 + #else
    2.85 +   pid = getpid ();
    2.86 +-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
    2.87 ++#endif /* HAVE___LIBC_ONCE */
    2.88 + #endif /* HAVE_PTHREAD_ATFORK */
    2.89 + 
    2.90 +   euid = geteuid ();
    2.91 +@@ -1155,7 +1155,7 @@
    2.92 +   syslog (LOG_DEBUG,
    2.93 + 	  "nss_ldap: __session.ls_state=%d, __session.ls_conn=%p, __euid=%i, euid=%i",
    2.94 + 	  __session.ls_state, __session.ls_conn, __euid, euid);
    2.95 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
    2.96 ++#elif defined(HAVE___LIBC_ONCE)
    2.97 +   syslog (LOG_DEBUG,
    2.98 + 	  "nss_ldap: libpthreads=%s, __session.ls_state=%d, __session.ls_conn=%p, __pid=%i, pid=%i, __euid=%i, euid=%i",
    2.99 +  	  ((__pthread_once == NULL || __pthread_atfork == NULL) ? "FALSE" : "TRUE"),
   2.100 +@@ -1179,11 +1179,11 @@
   2.101 +     }
   2.102 +   else
   2.103 + #ifndef HAVE_PTHREAD_ATFORK
   2.104 +-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   2.105 ++#if defined(HAVE___LIBC_ONCE)
   2.106 +   if ((__pthread_once == NULL || __pthread_atfork == NULL) && __pid != pid)
   2.107 + #else
   2.108 +   if (__pid != pid)
   2.109 +-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
   2.110 ++#endif /* HAVE___LIBC_ONCE */
   2.111 +     {
   2.112 +       do_close_no_unbind ();
   2.113 +     }
   2.114 +@@ -1244,9 +1244,9 @@
   2.115 +       debug ("<== do_init (pthread_once failed)");
   2.116 +       return NSS_UNAVAIL;
   2.117 +     }
   2.118 +-#elif defined(HAVE_PTHREAD_ATFORK) && ( defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H) )
   2.119 ++#elif defined(HAVE_PTHREAD_ATFORK) && defined(HAVE___LIBC_ONCE)
   2.120 +   __libc_once (__once, do_atfork_setup);
   2.121 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   2.122 ++#elif defined(HAVE___LIBC_ONCE)
   2.123 +   /*
   2.124 +    * Only install the pthread_atfork() handlers i
   2.125 +    * we are linked against libpthreads. Otherwise,
   2.126 +Only in nss_ldap-265: ldap-nss.c.orig
   2.127 +diff -u -r nss_ldap-265.orig/ldap-nss.h nss_ldap-265/ldap-nss.h
   2.128 +--- nss_ldap-265.orig/ldap-nss.h	2009-11-06 19:28:08.000000000 +0900
   2.129 ++++ nss_ldap-265/ldap-nss.h	2012-12-20 17:04:48.798942465 +0900
   2.130 +@@ -670,7 +670,7 @@
   2.131 + #define NSS_LDAP_LOCK(m)		mutex_lock(&m)
   2.132 + #define NSS_LDAP_UNLOCK(m)		mutex_unlock(&m)
   2.133 + #define NSS_LDAP_DEFINE_LOCK(m)		static mutex_t m = DEFAULTMUTEX
   2.134 +-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
   2.135 ++#elif defined(HAVE___LIBC_LOCK_LOCK) && defined(HAVE___LIBC_LOCK_UNLOCK)
   2.136 + #define NSS_LDAP_LOCK(m)		__libc_lock_lock(m)
   2.137 + #define NSS_LDAP_UNLOCK(m)		__libc_lock_unlock(m)
   2.138 + #define NSS_LDAP_DEFINE_LOCK(m)		static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER
   2.139 +Only in nss_ldap-265: ldap-nss.h.orig
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/nss_ldap/stuff/patches/series	Sat Nov 18 22:23:47 2017 +0100
     3.3 @@ -0,0 +1,1 @@
     3.4 +nss_ldap-265-glibc-2.16.patch