git.iko.soy/typeable/entropy
on main help sign in
Fix #27 'static inline' not 'inline'.

Notice C99 symantics for non-static inline calls mandate another semantically identical, symbolically identical, non-inlined function for obvious linking reasons. Why the existing 'inline' function is not used for that purpose is a mystery to me - I can't think of a sensible use case where the unit of compilation/linking should matter.

commitfc88376d59727f9db88f395862810b6e437356c6 authorThomas M. DuBuisson <tommd@galois.com> dateMon 15 Jun 2015, 13:39 (11 years ago) parentab73b6e
1 file changed+2−2
cbits/rdrand.c+2−2
cbits/rdrand.c+2−2
@@ -13,7 +13,7 @@ int cpu_has_rdrand()
1313
1414#ifdef arch_x86_64
1515// Returns 1 on success
16−inline int _rdrand64_step(uint64_t *therand)
16+static inline int _rdrand64_step(uint64_t *therand)
1717{
1818 unsigned char err;
1919 asm volatile("rdrand %0 ; setc %1"
@@ -56,7 +56,7 @@ int get_rand_bytes(uint8_t *therand, size_t len)
5656
5757#ifdef arch_i386
5858// Returns 1 on success
59−inline int _rdrand32_step(uint32_t *therand)
59+static inline int _rdrand32_step(uint32_t *therand)
6060{
6161 unsigned char err;
6262 asm volatile("rdrand %0 ; setc %1"