Porting to FreeBSD, chapter 3