|
|
Message-ID: <20260411194319.GX1827@brightrain.aerifal.cx> Date: Sat, 11 Apr 2026 15:43:19 -0400 From: Rich Felker <dalias@...c.org> To: Collin Funk <collin.funk1@...il.com> Cc: musl@...ts.openwall.com, Gilles Peskine <gilles.peskine@....com> Subject: Re: Detecting getrandom() or syscall() On Sat, Apr 11, 2026 at 12:13:10PM -0700, Collin Funk wrote: > 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 This is not valid and will likely break when we implement a more correct version of O_SEARCH. Please do not recommend wrong hacks like this. Rich
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.