34484a
commit 13e70b397dcb0d1bf4a869b670f041c1d7b730d0
34484a
Author: Björn Esser <besser82@fedoraproject.org>
34484a
Date:   Sat Jan 20 20:22:53 2018 +0100
34484a
34484a
    pp: Guard fix for really old bug in glibc libcrypt
34484a
34484a
diff --git a/pp.c b/pp.c
34484a
index d50ad7ddbf..6510c7b15c 100644
34484a
--- a/pp.c
34484a
+++ b/pp.c
34484a
@@ -3650,8 +3650,12 @@ PP(pp_crypt)
34484a
 #if defined(__GLIBC__) || defined(__EMX__)
34484a
 	if (PL_reentrant_buffer->_crypt_struct_buffer) {
34484a
 	    PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
34484a
-	    /* work around glibc-2.2.5 bug */
34484a
+#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
34484a
+    (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
34484a
+	    /* work around glibc-2.2.5 bug, has been fixed at some
34484a
+	     * time in glibc-2.3.X */
34484a
 	    PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
34484a
+#endif
34484a
 	}
34484a
 #endif
34484a
     }