1127608Stjr/*-
2127608Stjr * Copyright (c) 1994
3127608Stjr *	The Regents of the University of California.  All rights reserved.
4127608Stjr *
5127608Stjr * Redistribution and use in source and binary forms, with or without
6127608Stjr * modification, are permitted provided that the following conditions
7127608Stjr * are met:
8127608Stjr * 1. Redistributions of source code must retain the above copyright
9127608Stjr *    notice, this list of conditions and the following disclaimer.
10127608Stjr * 2. Redistributions in binary form must reproduce the above copyright
11127608Stjr *    notice, this list of conditions and the following disclaimer in the
12127608Stjr *    documentation and/or other materials provided with the distribution.
13127608Stjr * 4. Neither the name of the University nor the names of its contributors
14127608Stjr *    may be used to endorse or promote products derived from this software
15127608Stjr *    without specific prior written permission.
16127608Stjr *
17127608Stjr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18127608Stjr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19127608Stjr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20127608Stjr * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21127608Stjr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22127608Stjr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23127608Stjr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24127608Stjr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25127608Stjr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26127608Stjr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27127608Stjr * SUCH DAMAGE.
28196820Sdes */
29127608Stjr
30127608Stjr#if defined(LIBC_SCCS) && !defined(lint)
31127608Stjrstatic char sccsid[] = "From: @(#)uname.c	8.1 (Berkeley) 1/4/94";
32127608Stjr#endif /* LIBC_SCCS and not lint */
33127608Stjr#include <sys/cdefs.h>
34127608Stjr__FBSDID("$FreeBSD: releng/10.3/lib/libc/gen/uname.c 202661 2010-01-19 23:07:12Z ed $");
35127608Stjr
36127608Stjr#define uname wrapped_uname
37127608Stjr#include <sys/param.h>
38127608Stjr#include <sys/sysctl.h>
39127608Stjr#include <sys/utsname.h>
40127608Stjr#include <errno.h>
41127608Stjr#undef uname
42127608Stjr
43127608Stjrint
44127608Stjruname(struct utsname *name)
45127608Stjr{
46127608Stjr	return __xuname(32, name);
47127608Stjr}
48127608Stjr