Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readdir_r is deprecated #29

Open
Piratonym opened this issue Aug 29, 2016 · 1 comment
Open

readdir_r is deprecated #29

Piratonym opened this issue Aug 29, 2016 · 1 comment

Comments

@Piratonym
Copy link

Piratonym commented Aug 29, 2016

GNU libc 2.24 (published 2016-08-04) deprecated readdir_r, see the announcement email:

  • The readdir_r and readdir64_r functions have been deprecated. It is
    recommended to use readdir and readdir64 instead.

This causes the build to fail:

[566/727] Building C object boringssl/decrepit/ssl/CMakeFiles/ssl_decrepit.dir/ssl_decrepit.c.o
FAILED: boringssl/decrepit/ssl/CMakeFiles/ssl_decrepit.dir/ssl_decrepit.c.o 
/usr/bin/cc  -DBORINGSSL_IMPLEMENTATION -DUSE_OPENSSL -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I../src -I../src/third_party/modp_b64 -I../boringssl/include -I../src/third_party/protobuf/src -I/src -I../boringssl/decrepit/ssl/../../include -Wall -fpic -gdwarf-4 -Wall -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -ggdb -fvisibility=hidden -Wmissing-prototypes -Wshadow -std=c11 -D_XOPEN_SOURCE=700 -g -MD -MT boringssl/decrepit/ssl/CMakeFiles/ssl_decrepit.dir/ssl_decrepit.c.o -MF boringssl/decrepit/ssl/CMakeFiles/ssl_decrepit.dir/ssl_decrepit.c.o.d -o boringssl/decrepit/ssl/CMakeFiles/ssl_decrepit.dir/ssl_decrepit.c.o   -c ../boringssl/decrepit/ssl/ssl_decrepit.c
../boringssl/decrepit/ssl/ssl_decrepit.c: In function ‘OPENSSL_DIR_read’:
../boringssl/decrepit/ssl/ssl_decrepit.c:157:3: error: ‘readdir_r’ is deprecated [-Werror=deprecated-declarations]
   if (readdir_r((*ctx)->dir, &(*ctx)->dirent, &dirent) != 0 ||
   ^~
In file included from ../boringssl/decrepit/ssl/ssl_decrepit.c:115:0:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
cc1: all warnings being treated as errors
[…]
ninja: build stopped: subcommand failed.
@bkfox
Copy link

bkfox commented Feb 12, 2017

I've tried compiling with git version of boringssl (Change-Id: I4b586dce37f4db0770e516888c2eeeae3ecffd97):

mv boringssl boringssl_
git clone https://github.com/google/boringssl.git

Code needs to be patched:

diff --git a/src/net/quic/core/crypto/chacha20_poly1305_decrypter.cc b/src/net/quic/core/crypto/chacha20_poly1305_decrypter.cc
index 302d105..5ada475 100644
--- a/src/net/quic/core/crypto/chacha20_poly1305_decrypter.cc
+++ b/src/net/quic/core/crypto/chacha20_poly1305_decrypter.cc
@@ -29,11 +29,11 @@ ChaCha20Poly1305Decrypter::ChaCha20Poly1305Decrypter()
 ChaCha20Poly1305Decrypter::~ChaCha20Poly1305Decrypter() {}
 
 const char* ChaCha20Poly1305Decrypter::cipher_name() const {
-  return TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305;
+  return TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256;
 }
 
 uint32_t ChaCha20Poly1305Decrypter::cipher_id() const {
-  return TLS1_CK_ECDHE_RSA_CHACHA20_POLY1305;
+  return TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256;
 }
 
 }  // namespace net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants