md5, sha1, sha256, sha512: fix link error with partial libcrypto
[gnulib.git] / tests / test-fwrite.c
index 671c033..ef72338 100644 (file)
@@ -72,7 +72,9 @@ main (int argc, char **argv)
       }
   }
   {
-    FILE *fp = fdopen (99, "w");
+    FILE *fp;
+    close (99);
+    fp = fdopen (99, "w");
     if (fp != NULL)
       {
         char buf[5] = "world";