File libgcrypt-Restore-self-tests-from-constructor.patch of Package libgcrypt

Index: libgcrypt-1.8.2/src/global.c
===================================================================
--- libgcrypt-1.8.2.orig/src/global.c
+++ libgcrypt-1.8.2/src/global.c
@@ -140,8 +140,9 @@ global_init (void)
   /* We always need the FSM lock to be functional. */
   _gcry_initialize_fsm_lock ();
 
-  /* Run the self-tests from the constructor. */
-  global_init ();
+  /* We run the integrity check at this point. The remaining
+     selftests are run before use of the library by application. */
+  _gcry_fips_run_selftests (0);
 }
 
 /* This function is called by the macro fips_is_operational and makes
openSUSE Build Service is sponsored by