PR: ports/48118 Submitted by: tadalunch@sources.redhat.com
PR: 28076 Submitted by: Patrick Li <pat@databits.net>
Obtained from: NetBSD (parts)