Portability fixes for GNU/kFreeBSD

q

 Please enter the commit message for your changes. Lines starting