fuzz: don't try and use fopencookie() when building for Android #22069

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:dont_use_custom_stream_android changing 1 files +1 −1
  1. fanquake commented at 3:10 AM on May 26, 2021: member

    When building for Android, _GNU_SOURCE will be defined:

    /home/ubuntu/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++ -dM -E -x c++ - < /dev/null
    #define _GNU_SOURCE 1
    #define _LP64 1
    #define __AARCH64EL__ 1
    #define __AARCH64_CMODEL_SMALL__ 1
    #define __ANDROID_API__ 30
    #define __ANDROID__ 1
    #define __ARM_64BIT_STATE 1
    .....
    

    but it doesn't have the fopencookie() function, or define the cookie_io_functions_t type, which results in compile failures:

    In file included from test/fuzz/addition_overflow.cpp:7:
    ./test/fuzz/util.h:388:15: error: unknown type name 'cookie_io_functions_t'
            const cookie_io_functions_t io_hooks = {
                  ^
    15 warnings and 1 error generated.
    

    Just skip trying to use it if we are building for Android. Should fix #22062.

  2. fuzz: don't try and use fopencookie when building for Android
    When building for Android, _GNU_SOURCE will be defined, but it doesn't
    actually have the fopencookie() function, or define the
    cookie_io_functions_t type.
    
    For now just skip trying to use it if we are building for Android.
    
    Should fix #22062.
    1be6267ce1
  3. fanquake added the label Tests on May 26, 2021
  4. fanquake requested review from practicalswift on May 26, 2021
  5. practicalswift approved
  6. practicalswift commented at 5:42 AM on May 26, 2021: contributor

    cr ACK 1be6267ce1ee142c3b90baed1925a82eab6514aa

  7. MarcoFalke merged this on May 26, 2021
  8. MarcoFalke closed this on May 26, 2021

  9. fanquake deleted the branch on May 26, 2021
  10. sidhujag referenced this in commit 2d357c24e8 on May 27, 2021
  11. gwillen referenced this in commit 84be3d46b1 on Jun 1, 2022
  12. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me