File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 88#include <zephyr/drivers/entropy.h>
99#include <zephyr/kernel.h>
1010#include <zephyr/sys/atomic.h>
11+ #include <zephyr/sys/util.h>
1112#include <soc.h>
1213#include <hal/nrf_rng.h>
1314#include <zephyr/irq.h>
@@ -76,7 +77,7 @@ struct rng_pool {
7677 uint8_t last ;
7778 uint8_t mask ;
7879 uint8_t threshold ;
79- uint8_t buffer [ 0 ] ;
80+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
8081};
8182
8283#define RNG_POOL_DEFINE (name , len ) uint8_t name[sizeof(struct rng_pool) + (len)]
Original file line number Diff line number Diff line change 1212#include <DA1469xAB.h>
1313#include <zephyr/pm/device.h>
1414#include <zephyr/pm/policy.h>
15+ #include <zephyr/sys/util.h>
1516
1617#include <zephyr/logging/log.h>
1718LOG_MODULE_REGISTER (smartbond_entropy , CONFIG_ENTROPY_LOG_LEVEL );
@@ -27,7 +28,7 @@ struct rng_pool {
2728 uint8_t last ;
2829 uint8_t mask ;
2930 uint8_t threshold ;
30- uint8_t buffer [ 0 ] ;
31+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
3132};
3233
3334#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 {
6565 uint8_t last ;
6666 uint8_t mask ;
6767 uint8_t threshold ;
68- uint8_t buffer [ 0 ] ;
68+ FLEXIBLE_ARRAY_DECLARE ( uint8_t , buffer ) ;
6969};
7070
7171#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