- Fix build on stable/10 and head. - Style clean-ups.
- Fix CFLAGS and PTHREAD_LIBS handling. PR: ports/163225