*: more portability fixes by Dan Fandrich

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
10 files changed