public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/getrandom: remove reference to '<linux/random.h>'
@ 2015-07-09  1:59 Xiaoguang Wang
  2015-07-13 10:07 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoguang Wang @ 2015-07-09  1:59 UTC (permalink / raw)
  To: ltp-list

Given that we use ltp_syscall() to call getrandom(2) and already
have "GRND_RANDOM, GRND_NONBLOCK" defined in lapi/getrandom.h, indeed
we don't need to include '<linux/random.h>'. Also including
'<linux/random.h>'' will result in some compilation errors in older
linux distribution, for example, in RHEL5.11GA, there will be such
errors:
  In file included from getrandom01.c:29:
  /usr/include/linux/random.h:38: error: expected specifier-qualifier-list before ‘__u32’
  /usr/include/linux/random.h:42: error: expected specifier-qualifier-list before ‘__u32’
This patch will also fix these compilation errors.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
---
 testcases/kernel/syscalls/getrandom/getrandom01.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom02.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom03.c | 1 -
 testcases/kernel/syscalls/getrandom/getrandom04.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/testcases/kernel/syscalls/getrandom/getrandom01.c b/testcases/kernel/syscalls/getrandom/getrandom01.c
index 818372e..103748a 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom01.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom01.c
@@ -26,7 +26,6 @@
  *
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom02.c b/testcases/kernel/syscalls/getrandom/getrandom02.c
index 905917b..0ac8bd2 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom02.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom02.c
@@ -27,7 +27,6 @@
  *
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom03.c b/testcases/kernel/syscalls/getrandom/getrandom03.c
index 9c13d09..03950e0 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom03.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom03.c
@@ -30,7 +30,6 @@
  *  number of bytes required and expects success.
  */
 
-#include <linux/random.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
 #include "test.h"
diff --git a/testcases/kernel/syscalls/getrandom/getrandom04.c b/testcases/kernel/syscalls/getrandom/getrandom04.c
index 4e099e1..10ab44b 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom04.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom04.c
@@ -30,7 +30,6 @@
  *  descriptors to 3 and expects success.
  */
 
-#include <linux/random.h>
 #include <sys/resource.h>
 #include "lapi/getrandom.h"
 #include "linux_syscall_numbers.h"
-- 
1.8.2.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-13 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  1:59 [LTP] [PATCH] syscalls/getrandom: remove reference to '<linux/random.h>' Xiaoguang Wang
2015-07-13 10:07 ` Cyril Hrubis
     [not found]   ` <1721921160.16296939.1436785318844.JavaMail.zimbra@redhat.com>
2015-07-13 11:12     ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox