From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] tlsclient and hjgit for unix.
Date: Sat, 20 Feb 2021 20:39:08 -0500 [thread overview]
Message-ID: <3789890B-B415-4EC6-9CF6-5CD18188D073@stanleylieber.com> (raw)
In-Reply-To: <39A9B17D51CA53B178DD683DA5835699@eigenstate.org>
On February 20, 2021 7:24:50 PM EST, ori@eigenstate.org wrote:
>Quoth sl@stanleylieber.com:
>> awesome! i have immediate use for this.
>>
>> on openbsd, build dies here:
>>
>> gcc -Wall -Wno-missing-braces -Wno-parentheses -ggdb -I.. -I../include -c -D_THREAD_SAFE -O2 -c genrandom.c
>> genrandom.c:6:24: error: sys/random.h: No such file or directory
>> genrandom.c: In function 'genrandom':
>> genrandom.c:11: warning: implicit declaration of function 'getrandom'
>> *** Error 1 in libc (<sys.mk>:87 'genrandom.o')
>> *** Error 2 in /home/sl/src/tlsclient (Makefile:34 'libc/libc.a')
>>
>> sl
>
>Give this a shot.
>It should work at least on FreeBSD, OpenBSD, and Ubuntu.
>
>
>diff --git a/libc/genrandom.c b/libc/genrandom.c
>index 42522aa..890c291 100644
>--- a/libc/genrandom.c
>+++ b/libc/genrandom.c
>@@ -3,10 +3,10 @@
>
> #undef long
> #undef ulong
>-#include <sys/random.h>
>+#include <unistd.h>
>
> void
> genrandom(uchar *buf, int nbytes)
> {
>- getrandom(buf, nbytes, 0);
>+ getentropy(buf, nbytes);
> }
>
>
that worked, thanks.
now:
rachael$ 9cpu
./9cpu[35]: syntax error: `(' unexpected
sl
next prev parent reply other threads:[~2021-02-21 1:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-20 22:32 Jacob Moody
2021-02-20 23:39 ` sl
2021-02-21 0:24 ` ori
2021-02-21 1:39 ` Stanley Lieber [this message]
2021-02-21 2:43 ` Jacob Moody
2021-02-21 9:49 ` J D
2021-02-21 16:01 ` Stanley Lieber
2021-02-21 2:23 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3789890B-B415-4EC6-9CF6-5CD18188D073@stanleylieber.com \
--to=sl@stanleylieber.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).