diff --git a/src/crypto/bio/bio_test.cc b/src/crypto/bio/bio_test.cc index a169b56d1..c9e0ae025 100644 --- a/src/crypto/bio/bio_test.cc +++ b/src/crypto/bio/bio_test.cc @@ -633,8 +633,11 @@ TEST(BIOTest, Gets) { check_bio_gets(bio.get()); } - using ScopedFILE = std::unique_ptr; - ScopedFILE file(tmpfile(), fclose); + struct FileCloser { + void operator()(FILE *f) const { fclose(f); } + }; + using ScopedFILE = std::unique_ptr; + ScopedFILE file(tmpfile()); #if defined(OPENSSL_ANDROID) // On Android, when running from an APK, |tmpfile| does not work. See // b/36991167#comment8.