summaryrefslogtreecommitdiff
path: root/emulator/phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/phy.c')
-rw-r--r--emulator/phy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/emulator/phy.c b/emulator/phy.c
index 44cace438..7de85fb05 100644
--- a/emulator/phy.c
+++ b/emulator/phy.c
@@ -19,7 +19,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
-#include <sys/random.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <time.h>
@@ -174,7 +173,7 @@ struct bt_phy *bt_phy_new(void)
mainloop_add_fd(phy->rx_fd, EPOLLIN, phy_rx_callback, phy, NULL);
if (!get_random_bytes(&phy->id, sizeof(phy->id))) {
- if (getrandom(&phy->id, sizeof(phy->id), 0) < 0) {
+ if (util_getrandom(&phy->id, sizeof(phy->id), 0) < 0) {
mainloop_remove_fd(phy->rx_fd);
close(phy->tx_fd);
close(phy->rx_fd);