Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <em26c5f625-b998-4d3f-9529-5ec08d8365ad@skarnet.org>
Date: Sat, 11 Apr 2026 21:01:29 +0000
From: "Laurent Bercot" <ska-dietlibc@...rnet.org>
To: musl@...ts.openwall.com
Subject: Re[2]: Detecting getrandom() or syscall()

>available at link time). Compile-and-link might work on Linux, but
>even there I'm not sure.

  It absolutely does work on Linux. 🙂

  Here is the source file for a compile-and-link test for getrandom:
https://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/tree/src/sysdeps/trygetrandom.c

  The test is called in the configure script here:
https://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/tree/configure#n711
(cl stands for compile+link)

  and the "choose" function is defined here:
https://git.skarnet.org/cgi-bin/cgit.cgi/skalibs/tree/configure#n154

  You don't need autoconf, it's doable manually. Yes, it is a lot of 
work,
not gonna lie, but it's the only reliable way to do it.

--
  Laurent

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.