- NetBSD Manual Pages
COMPAT_30(8) NetBSD System Manager's Manual COMPAT_30(8)
Powered by man-cgi (2020-09-24).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
compat_30 -- setup procedure for backward compatibility on post-3.0
The compat_30 module allows NetBSD to run NetBSD 3.0 executables.
The support is present if the kernel was built with option COMPAT_30. It
is not available as a loadable module.
Static executables typically need no additional setup. Dynamic binaries
may require shared libraries whose major version number changed since
NetBSD 3.0, which are listed below. A shadow directory under /emul is
not used; the libraries can be obtained from a NetBSD 3.0 distribution
and installed in the original directories shown, as the major version
number in the file name will prevent conflicts. If an upgrade installa-
tion from NetBSD 3.0 has been done and these libraries are still present,
nothing more need be done.
Libraries needed from 3.0
COMPAT_30 enables the NetBSD 3.0 versions of the following system calls,
whose syscall numbers and argument structures were changed after the 3.0
release to accommodate 64-bit filesystems: fhstat(2), fstat(2),
getdents(2), lstat(2), stat(2).
The filehandle structure (formerly fhandle_t) was made opaque to userland
and variable-sized. A fh_size argument was added to related syscalls:
fhstat(2), fhstatvfs(2), fhstatvfs1(2), fhopen(2), getfh(2). This
changes the API and ABI of those syscalls, COMPAT_30 enables binary com-
patibility with the old ABI. Source compatibility is not provided, as
use of those syscalls is supposed to be rare.
The error code from the socket(2) syscall changed from EPROTONOSUPPORT to
EAFNOSUPPORT in the case of an unsupported address family. COMPAT_30
enables binary compatibility with the old ABI. Source compatiblility is
The struct ntptimeval used by ntp_gettime(2) changed with the implementa-
tion of timecounters.
config(1), fhstat(2), fstat(2), getdents(2), lstat(2), stat(2),
NetBSD offers back-compatibility options back to NetBSD 0.9, but the
first to be documented with a manual page is compat_30.
The compatible getdents(2) is unable to see directory entries beneath the
top layer of a union, even though the real 3.0 getdents() did not have
Programs with security impact that receive incorrect directory contents
from getdents() may behave improperly, as when they are unable to find,
or find the wrong versions of, important files.
NetBSD 9.99 December 15, 2007 NetBSD 9.99