Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wlyd48ft.fsf@gmail.com>
Date: Sat, 11 Apr 2026 12:13:10 -0700
From: Collin Funk <collin.funk1@...il.com>
To: musl@...ts.openwall.com
Cc: Gilles Peskine <gilles.peskine@....com>
Subject: Re: Detecting getrandom() or syscall()

Gilles Peskine <gilles.peskine@....com> writes:

> I agree that something like
>     #if __has_function_syscall
> is the way to go! So what macro can we use to test for the presence of
> syscall() on musl or elsewhere?

#include <fcntl.h>
#if (defined __linux__ && defined O_SEARCH && defined O_PATH    \
     && O_SEARCH == O_PATH)
# define MUSL true
#else
# define MUSL false
#endif

Collin

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.