[LEDE-DEV] [PATCH ubox] cmake: Check for getrandom system call

Florian Fainelli f.fainelli at gmail.com
Tue Feb 21 15:11:13 PST 2017



On 02/21/2017 05:12 AM, Felix Fietkau wrote:
> On 2017-02-05 03:41, Florian Fainelli wrote:
>> In case we are building against a kernel that is too old and does not
>> support SYS_getrandom, error out with a message indicating so.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
>> ---
>>  CMakeLists.txt | 15 +++++++++++----
>>  1 file changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/CMakeLists.txt b/CMakeLists.txt
>> index 6cf0c934aac6..9033493c7a3b 100644
>> --- a/CMakeLists.txt
>> +++ b/CMakeLists.txt
>> @@ -16,10 +16,17 @@ IF(DEBUG)
>>    ADD_DEFINITIONS(-DDEBUG -g3)
>>  ENDIF()
>>  
>> -ADD_EXECUTABLE(getrandom getrandom.c)
>> -INSTALL(TARGETS getrandom
>> -	RUNTIME DESTINATION bin
>> -)
>> +INCLUDE (CheckSymbolExists)
>> +CHECK_SYMBOL_EXISTS(SYS_getrandom sycall.h getrandom)
> Please test your changes in LEDE before sending them out. This does not
> compile at all because of a typo.
> I've pushed a fix to git.

Thanks, and sorry about that.
-- 
Florian



More information about the Lede-dev mailing list