File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 8
8
#include <zephyr/drivers/entropy.h>
9
9
#include <zephyr/kernel.h>
10
10
#include <zephyr/sys/atomic.h>
11
+ #include <zephyr/sys/util.h>
11
12
#include <soc.h>
12
13
#include <hal/nrf_rng.h>
13
14
#include <zephyr/irq.h>
@@ -76,7 +77,7 @@ struct rng_pool {
76
77
uint8_t last ;
77
78
uint8_t mask ;
78
79
uint8_t threshold ;
79
- uint8_t buffer [ 0 ] ;
80
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
80
81
};
81
82
82
83
#define RNG_POOL_DEFINE (name , len ) uint8_t name[sizeof(struct rng_pool) + (len)]
Original file line number Diff line number Diff line change 12
12
#include <DA1469xAB.h>
13
13
#include <zephyr/pm/device.h>
14
14
#include <zephyr/pm/policy.h>
15
+ #include <zephyr/sys/util.h>
15
16
16
17
#include <zephyr/logging/log.h>
17
18
LOG_MODULE_REGISTER (smartbond_entropy , CONFIG_ENTROPY_LOG_LEVEL );
@@ -27,7 +28,7 @@ struct rng_pool {
27
28
uint8_t last ;
28
29
uint8_t mask ;
29
30
uint8_t threshold ;
30
- uint8_t buffer [ 0 ] ;
31
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
31
32
};
32
33
33
34
#define RNG_POOL_DEFINE (name , len ) uint8_t name[sizeof(struct rng_pool) + (len)]
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ struct rng_pool {
65
65
uint8_t last ;
66
66
uint8_t mask ;
67
67
uint8_t threshold ;
68
- uint8_t buffer [ 0 ] ;
68
+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
69
69
};
70
70
71
71
#define RNG_POOL_DEFINE (name , len ) uint8_t name[sizeof(struct rng_pool) + (len)]
You can’t perform that action at this time.
0 commit comments