1 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ 2 /* 3 * Utsname definitions for NOLIBC 4 * Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu> 5 */ 6 7 /* make sure to include all global symbols */ 8 #include "../nolibc.h" 9 10 #ifndef _NOLIBC_SYS_UTSNAME_H 11 #define _NOLIBC_SYS_UTSNAME_H 12 13 #include "../sys.h" 14 15 #include <linux/utsname.h> 16 17 /* 18 * int uname(struct utsname *buf); 19 */ 20 21 struct utsname { 22 char sysname[65]; 23 char nodename[65]; 24 char release[65]; 25 char version[65]; 26 char machine[65]; 27 char domainname[65]; 28 }; 29 30 static __attribute__((unused)) sys_uname(struct utsname * buf)31int sys_uname(struct utsname *buf) 32 { 33 return my_syscall1(__NR_uname, buf); 34 } 35 36 static __attribute__((unused)) uname(struct utsname * buf)37int uname(struct utsname *buf) 38 { 39 return __sysret(sys_uname(buf)); 40 } 41 42 #endif /* _NOLIBC_SYS_UTSNAME_H */ 43