Edit

kc3-lang/libbsd/src/arc4random.h

Branch :

  • Browse

    Commit

  • Author : Guillem Jover
    Date : 2015-12-02 03:08:17
    Hash : 75729394
    Message : Unify most arc4random Unix hooks into a single file The Unix hook should work for most Unix-like systems, move glibc specific code there and a FreeBSd specific comment, and remove the rest. Also change the code to always fallback to use the generic Unix code. This should cover GNU/Hurd and GNU/kFreeBSD among others.

  • src/arc4random.h
  • #ifndef LIBBSD_ARC4RANDOM_H
    #define LIBBSD_ARC4RANDOM_H
    
    #include <sys/param.h>
    
    int
    getentropy(void *buf, size_t len);
    
    #if defined(__OpenBSD__)
    #include "arc4random_openbsd.h"
    #else
    #include "arc4random_unix.h"
    #endif
    
    #endif