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