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