Hi! > 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.
This is not correct. The lapi/getrandom.h defines these as fallback definitions only if they are not defined allready. And we really want to use the defines from the system if they are available to ensure that they are correct. The system header on older distros likely misses to include linux/types.h to get the kernel types defined. What about moving the #include <linux/random.h> to start of lapi/getrandom.h and including <linux/types.h> there as well if needed (would require configure check). -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ 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