[PATCH 1/1] libfrog: Fix cross-compilation issue with randbytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



randbytes.c was mostly split off from crc32.c and, like crc32.c, is
used for selftests, which are run on the build host. As such it should
not include platform_defs.h which in turn includes urcu.h from
userspace-rcu library, because the build host might not have the
library installed.

Signed-off-by: Krzesimir Nowak <knowak@xxxxxxxxxxxxx>
---
 libfrog/randbytes.c | 1 -
 libfrog/randbytes.h | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libfrog/randbytes.c b/libfrog/randbytes.c
index f22da0d3..2023b601 100644
--- a/libfrog/randbytes.c
+++ b/libfrog/randbytes.c
@@ -6,7 +6,6 @@
  *
  * This is the buffer of random bytes used for self tests.
  */
-#include "platform_defs.h"
 #include "libfrog/randbytes.h"
 
 /* 4096 random bytes */
diff --git a/libfrog/randbytes.h b/libfrog/randbytes.h
index 00fd7c4c..fddea9c7 100644
--- a/libfrog/randbytes.h
+++ b/libfrog/randbytes.h
@@ -6,6 +6,8 @@
 #ifndef __LIBFROG_RANDBYTES_H__
 #define __LIBFROG_RANDBYTES_H__
 
+#include <stdint.h>
+
 extern uint8_t randbytes_test_buf[];
 
 #endif /* __LIBFROG_RANDBYTES_H__ */
-- 
2.25.1




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux