File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
components/wpa_supplicant/port Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 2424
2525#include "os.h"
2626#include <stdlib.h>
27- #include <posix/ time.h>
28- #include <posix/ sys/time.h>
27+ #include <time.h>
28+ #include <sys/time.h>
2929#include "esp_system.h"
3030#include "utils/common.h"
31- #include <random/rand32.h>
32-
3331
3432int os_get_time (struct os_time * t )
3533{
36- return gettimeofday ((struct timeval * ) t , NULL );
34+ struct timeval tv ;
35+ int ret = gettimeofday (& tv , NULL );
36+ t -> sec = (os_time_t ) tv .tv_sec ;
37+ t -> usec = tv .tv_usec ;
38+ return ret ;
3739}
3840
3941unsigned long os_random (void )
4042{
41- return sys_rand32_get ();
43+ return esp_random ();
4244}
4345
4446int os_get_random (unsigned char * buf , size_t len )
4547{
46- sys_rand_get (( void * ) buf , len );
48+ esp_fill_random ( buf , len );
4749 return 0 ;
4850}
4951
You can’t perform that action at this time.
0 commit comments