1/* 2 * Copyright 2009, Colin G��nther, coling@gmx.de. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5#ifndef _FBSD_COMPAT_SYS_LIBKERN_H_ 6#define _FBSD_COMPAT_SYS_LIBKERN_H_ 7 8 9#include <sys/cdefs.h> 10#include <sys/types.h> 11 12__BEGIN_DECLS 13 14 15extern int random(void); 16u_int read_random(void *, u_int); 17void arc4rand(void *ptr, u_int len, int reseed); 18uint32_t arc4random(void); 19void arc4random_buf(void *ptr, size_t len); 20 21int timingsafe_bcmp(const void *, const void *, size_t); 22 23static __inline int imax(int a, int b) { return (a > b ? a : b); } 24static __inline int imin(int a, int b) { return (a < b ? a : b); } 25 26extern int abs(int a); 27 28 29__END_DECLS 30 31#endif /* _FBSD_COMPAT_SYS_LIBKERN_H_ */ 32