uname(3): Add env override capability
authorJohn Marino <draco@marino.st>
Tue, 16 Feb 2016 11:26:51 +0000 (12:26 +0100)
committerJohn Marino <draco@marino.st>
Tue, 16 Feb 2016 11:39:28 +0000 (12:39 +0100)
commitd1be4fb6524f0f72f193e5743dc0ff31e63b6e1b
treee966cfd27aae0e4bd06e1ff1f530b47a6cb4f571
parent3268486f5e7569a5c826ce55e99317603b8cb2c3
uname(3): Add env override capability

The uname(1) program has honored UNAME_[x] overrides since DragonFly's
beginning, but libc's uname never did.  Make it recognize the following
environment variables:
  UNAME_m
  UNAME_r
  UNAME_s
  UNAME_v
These variables cause uname() to return the specified values instead of
what was built into libc.  This capability, which has been in FreeBSD for
more than a decade, is required for package builders that need to define
the jail environment different from the host (prime example: Python)
lib/libc/gen/uname.3
lib/libc/gen/uname.c