src/randomenv.cpp: fix build on uclibc #20358

pull ffontaine wants to merge 1 commits into bitcoin:master from ffontaine:master changing 1 files +3 −3
  1. ffontaine commented at 8:39 pm on November 9, 2020: contributor

    Check for HAVE_STRONG_GETAUXVAL or HAVE_WEAK_GETAUXVAL before using getauxval to avoid a build failure on uclibc

    Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

  2. src/randomenv.cpp: fix build on uclibc
    Check for HAVE_STRONG_GETAUXVAL or HAVE_WEAK_GETAUXVAL before using
    getauxval to avoid a build failure on uclibc
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
    330cb33985
  3. sipa commented at 9:26 pm on November 9, 2020: member
    Concept ACK
  4. fanquake added the label Utils/log/libs on Nov 10, 2020
  5. fanquake commented at 1:06 am on November 10, 2020: member
    Concept ACK - I’ll test with uClibc.
  6. practicalswift commented at 3:57 pm on November 10, 2020: contributor

    Concept ACK

    What a nice first-time contribution @ffontaine! Warm welcome as a contributor and hope to see more contributions in the future!

  7. luke-jr commented at 6:28 pm on November 13, 2020: member
    Won’t this fail without HAVE_STRONG_GETAUXVAL, since randomenv doesn’t define the weak variant?
  8. laanwj commented at 10:53 am on November 18, 2020: member

    The code change looks correct to me in any case.

    But I’m surprised, uClibc doesn’t have getauxval at all? It’s a slight bit worrying to me because, besides random seeding, it’s used for important kernel→userspace communication such as detecting what instruction sets are supported on ARM (and RISC-V and … probably many other architectures).

  9. ffontaine commented at 11:20 am on November 18, 2020: contributor
    There is no getauxval on uclibc-ng: https://github.com/wbx-github/uclibc-ng/search?q=getauxval. If this is a security issue for you, I can disable bitcoin with uclibc-ng toolchains in buildroot.
  10. laanwj commented at 9:07 am on November 19, 2020: member
    I don’t think it’s a security issue. There are many random sources used on Linux, one less will not significantly make things worse I would expect.
  11. laanwj commented at 10:55 am on November 19, 2020: member
    Code review ACK 330cb33985d0ce97c20f4a0f0bbda0fbffe098d4
  12. laanwj merged this on Nov 19, 2020
  13. laanwj closed this on Nov 19, 2020

  14. laanwj added the label Needs backport (0.20) on Nov 19, 2020
  15. laanwj added the label Needs backport (0.21) on Nov 19, 2020
  16. sidhujag referenced this in commit df565c94c8 on Nov 19, 2020
  17. jonasschnelli commented at 8:34 pm on December 7, 2020: contributor
    I think this change has no effect. The HAVE_STRONG_GETAUXVAL as well as HAVE_WEAK_GETAUXVAL symbols are not defined. They have been introduced via the crc32c subtree and are only used as CRC32 CPPFAGS (see Makefile.crc32c.include).
  18. maflcko removed the label Needs backport (0.20) on Dec 8, 2020
  19. maflcko removed the label Needs backport (0.21) on Dec 8, 2020
  20. maflcko commented at 3:41 pm on December 8, 2020: member
    removing from “needs backport” for now due to previous comment
  21. laanwj referenced this in commit 94a9cd25fd on Dec 14, 2020
  22. sidhujag referenced this in commit 64c284dd69 on Dec 15, 2020
  23. PastaPastaPasta referenced this in commit 81f6dd86b7 on Sep 17, 2021
  24. thelazier referenced this in commit 5af09a3267 on Sep 25, 2021
  25. bitcoin locked this on Feb 15, 2022
  26. hebasto commented at 4:19 pm on February 16, 2023: member

    ~Hmm, this patch looks buggy…~

    My mistake. Sorry for the noise.

  27. bitcoin unlocked this on Feb 16, 2023
  28. OlegGirko referenced this in commit a193964e0e on Apr 5, 2023
  29. gades referenced this in commit db8a4c7efc on Nov 9, 2023
  30. gades referenced this in commit 4325ea4940 on Dec 9, 2023
  31. bitcoin locked this on Feb 16, 2024

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: 2024-11-22 15:12 UTC

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