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

Florian Fainelli f.fainelli at gmail.com
Sat Sep 17 13:17:01 PDT 2016


Building ubox against kernel headers earlier than 3.17 would fail since
SYS_getrandom was not defined, so provide a definition for it.

Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
---
 getrandom.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/getrandom.c b/getrandom.c
index 96712028589b..e324072fcf0e 100644
--- a/getrandom.c
+++ b/getrandom.c
@@ -32,6 +32,10 @@ static int usage(char *name)
     return EXIT_FAILURE;
 }
 
+#ifndef SYS_getrandom
+#define SYS_getrandom	278
+#endif
+
 int main(int argc, char *argv[])
 {
     if (argc != 2)
-- 
2.7.4




More information about the Lede-dev mailing list