[hackers] [slstatus] entropy: Port to OpenBSD || Aaron Marcher

From: <git_AT_suckless.org>
Date: Sun, 6 May 2018 22:55:39 +0200 (CEST)

commit fd14804d6ffb212bb88bb5560508e38b6cf432fd
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Sun May 6 22:54:32 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun May 6 22:54:32 2018 +0200

    entropy: Port to OpenBSD
    
    OpenBSD's entropy design is superior to Linux.

diff --git a/README b/README
index 5c63c2c..889a3b4 100644
--- a/README
+++ b/README
_AT_@ -61,4 +61,3 @@ Porting to OpenBSD is the current goal before thinking about a release.
 
 The following functions are not portable at the moment:
 - wifi_{perc,essid}
-- entropy
diff --git a/components/entropy.c b/components/entropy.c
index 2baa8aa..1450b31 100644
--- a/components/entropy.c
+++ b/components/entropy.c
_AT_@ -14,5 +14,9 @@
                        bprintf("%d", num) : NULL;
         }
 #elif defined(__OpenBSD__)
- /* unimplemented */
+ const char *
+ entropy(void)
+ {
+ return "∞";
+ }
 #endif
Received on Sun May 06 2018 - 22:55:39 CEST

This archive was generated by hypermail 2.3.0 : Sun May 06 2018 - 23:00:25 CEST