summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-16 17:05:27 +0000
committered <ed@FreeBSD.org>2010-01-16 17:05:27 +0000
commit659d6713f842504f574711d0f89218e557b49e15 (patch)
tree3c682c7d94ba29f610db92727649ed601d7ad2a4 /lib
parentf4c494dd6f26489475cde84bfc1785abc8fd7897 (diff)
downloadFreeBSD-src-659d6713f842504f574711d0f89218e557b49e15.zip
FreeBSD-src-659d6713f842504f574711d0f89218e557b49e15.tar.gz
Unexpose the old uname(3) function.
Nowadays uname(3) is an inline function around __xuname(3). Prevent linkage of new binaries against this compatibility function, similar to what I did with ttyslot(3).
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/Symbol.map1
-rw-r--r--lib/libc/gen/uname.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index 42404bc..c21e936 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -296,7 +296,6 @@ FBSD_1.0 {
tcflow;
ualarm;
ulimit;
- uname;
unvis;
strunvis;
strunvisx;
diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c
index 5a7baf7..5f8422a 100644
--- a/lib/libc/gen/uname.c
+++ b/lib/libc/gen/uname.c
@@ -33,15 +33,15 @@ static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define uname wrapped_uname
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include <errno.h>
-#undef uname
int
-uname(struct utsname *name)
+__uname(struct utsname *name)
{
return __xuname(32, name);
}
+
+__sym_compat(uname, __uname, FBSD_1.0);
OpenPOWER on IntegriCloud