Merge pull request #15251 from benpicco/pkg/libhydrogen-bump

pkg/libhydrogen: bump version
This commit is contained in:
benpicco 2020-10-20 21:03:39 +02:00 committed by GitHub
commit 7d95e0843b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 36 deletions

View File

@ -1,6 +1,6 @@
PKG_NAME = libhydrogen
PKG_URL = https://github.com/jedisct1/libhydrogen
PKG_VERSION = 39eb529905ce118b674a7723c0d2b48074b9986d
PKG_VERSION = a4de6e098b5bbbd5389eb8058130f782b53826c3
PKG_LICENSE = ISC
include $(RIOTBASE)/pkg/pkg.mk

View File

@ -1,35 +0,0 @@
From 59ba85698386d2d55c86a00557169f3f5efad502 Mon Sep 17 00:00:00 2001
From: Silke Hofstra <silke@slxh.eu>
Date: Thu, 20 Sep 2018 16:32:40 +0200
Subject: [PATCH] Add support for RIOT OS
---
impl/random.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/impl/random.h b/impl/random.h
index f2ca1a4..2c09e02 100644
--- a/impl/random.h
+++ b/impl/random.h
@@ -99,6 +99,18 @@ hydro_random_init(void)
return 0;
}
+#elif defined(RIOT_VERSION) && !defined(__unix__)
+
+#include <random.h>
+
+static int
+hydro_random_init(void)
+{
+ random_bytes(hydro_random_context.state, sizeof hydro_random_context.state);
+ hydro_random_context.counter = ~LOAD64_LE(hydro_random_context.state);
+ return 0;
+}
+
#elif defined(_WIN32)
#include <windows.h>
--
2.18.0