Porting siba from FreeBSD.