logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Fix-ub_random_max-preprocessor-guard.patch (877B)


  1. From b9f80118e406d60e0e41b2f6b2549a8502fd1886 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Wed, 1 Dec 2021 12:42:54 -0800
  4. Subject: [PATCH] Fix ub_random_max preprocessor guard
  5. || has lower precedence than &&, so if HAVE_NETTLE and HAVE_LIBBSD
  6. are both defined, ub_random_max would get defined twice.
  7. ---
  8. util/random.c | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/util/random.c b/util/random.c
  11. index 6eb102c6..f7bb0a6f 100644
  12. --- a/util/random.c
  13. +++ b/util/random.c
  14. @@ -186,7 +186,7 @@ long int ub_random(struct ub_randstate* s)
  15. #endif /* HAVE_SSL or HAVE_LIBBSD or HAVE_NSS or HAVE_NETTLE */
  16. -#if defined(HAVE_NSS) || defined(HAVE_NETTLE) && !defined(HAVE_LIBBSD)
  17. +#if (defined(HAVE_NSS) || defined(HAVE_NETTLE)) && !defined(HAVE_LIBBSD)
  18. long int
  19. ub_random_max(struct ub_randstate* state, long int x)
  20. {
  21. --
  22. 2.34.0