diff --git a/pkg/emb6/contrib/target.c b/pkg/emb6/contrib/target.c index 03a6a9893d..edde8681fb 100644 --- a/pkg/emb6/contrib/target.c +++ b/pkg/emb6/contrib/target.c @@ -20,6 +20,9 @@ #include "mutex.h" #include "periph/gpio.h" #include "periph/hwrng.h" +#ifdef MODULE_RANDOM +#include "random.h" +#endif #include "xtimer.h" #include "target.h" @@ -50,7 +53,7 @@ uint8_t hal_getrand(void) hwnrg_read((char *)&res, sizeof(res)); return res; #elif defined(MODULE_RANDOM) - return (uint8_t)(genrand_uint32() % UINT8_MAX); + return (uint8_t)(random_uint32() % UINT8_MAX); #else return 4; /* keeping the meme alive ;-) */ #endif