From 59d5b0b9b3824b72ed3a380770cea88cab57da59 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 12 Apr 2021 19:12:34 +0100 Subject: [PATCH] netbsd build fix. getentropy not being guarded, providing prototype even tough we end up using the C++ api version. --- src/pal/pal_netbsd.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pal/pal_netbsd.h b/src/pal/pal_netbsd.h index ee1d566..0afc025 100644 --- a/src/pal/pal_netbsd.h +++ b/src/pal/pal_netbsd.h @@ -1,6 +1,18 @@ #pragma once #ifdef __NetBSD__ +# include + +namespace snmalloc +{ + template + int getentropy(Args...) + { + assert(0 && "Unreachable path"); + return -1; + } +} + # include "pal_bsd_aligned.h" namespace snmalloc