mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-27 20:14:15 +08:00
837d09e34c
* compat: update arc4random() to newer chacha20 based version from OpenBSD * arc4random: keep fd after first call to arc4random privsep + chroot doesn't allow us to reopen /dev/urandom in an unpriviledged process so we open the fd once and then hold onto it.
19 lines
437 B
C
19 lines
437 B
C
/*
|
|
* Arc4 random number generator for OpenBSD.
|
|
* Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
|
|
*
|
|
* Modification and redistribution in source and binary forms is
|
|
* permitted provided that due credit is given to the author and the
|
|
* OpenBSD project by leaving this copyright notice intact.
|
|
*/
|
|
|
|
#ifndef ARC4RANDOM_H
|
|
#define ARC4RANDOM_H
|
|
|
|
#include <stdint.h>
|
|
|
|
uint32_t arc4random(void);
|
|
void arc4random_buf(void *, size_t);
|
|
|
|
#endif
|