[LEDE-DEV] [PATCH ubox] getrandom: Define SYS_getrandom if no definition exists

Florian Fainelli f.fainelli at gmail.com
Sun Sep 18 12:36:52 PDT 2016


Le 18/09/2016 à 12:06, Etienne Champetier a écrit :
> (Answering from my phone with gmail so this email is in HTML and will
> get bounced by the ML)
> 
> Le 18 sept. 2016 14:03, "John Crispin" <john at phrozen.org
> <mailto:john at phrozen.org>> a écrit :
>>
>>
>>
>> On 18/09/2016 02:13, Florian Fainelli wrote:
>> > Le 17/09/2016 à 16:49, Etienne Champetier a écrit :
>> >> Hi Florian,
>> >>
>> >> What is your use case?
>> >
>> > Pre-built toolchain which ships with kernel headers 3.8 at the moment.
>> >
>> >> If you run it on kernel less than 3.17 this will then fail at run
> time ...
>> >
>> > I run a kernel newer than 3.17, but that's a good point.
>> >
>> >> I would prefer to not compile it instead of having an unusable binary
>> >
>> > Ok, so something more like that:
> 
> I still doesn't understand why getrandom isn't built with target kernel
> headers
> All LEDE targets are using linux 4.4 and OpenWRT targets are 3.18+, so
> this feels like the wrong fix for me

I am using an external toolchain which ships with kernel headers 3.8,
and anybody building an external toolchain in OpenWrt may run into a
similar problem.

Irrespective of the kernel version, since the system call is not present
in all kernel versions, testing for its presence does not hurt.

Besides that, people may end up backporting a newer user-space to run
with an older kernel that is pre 3.17, making things robust and testing
for what you use in your application is a good practice that has years
of precedence (autotols would not exist otherwise).
-- 
Florian



More information about the Lede-dev mailing list