srandomdev(), but can be used inside libraries. random() can't be used inside libraries because it breaks its possible predictable sequence. arc4random() is true random as designed, so its usage is library-safe. Obtained from: OpenBSD