File tree Expand file tree Collapse file tree 4 files changed +44
-27
lines changed Expand file tree Collapse file tree 4 files changed +44
-27
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ all_files := \
62
62
sys/time.h \
63
63
sys/timerfd.h \
64
64
sys/types.h \
65
+ sys/utsname.h \
65
66
sys/wait.h \
66
67
time.h \
67
68
types.h \
Original file line number Diff line number Diff line change 109
109
#include "sys/sysmacros.h"
110
110
#include "sys/time.h"
111
111
#include "sys/timerfd.h"
112
+ #include "sys/utsname.h"
112
113
#include "sys/wait.h"
113
114
#include "ctype.h"
114
115
#include "elf.h"
Original file line number Diff line number Diff line change 23
23
#include <linux/auxvec.h>
24
24
#include <linux/fcntl.h> /* for O_* and AT_* */
25
25
#include <linux/stat.h> /* for statx() */
26
- #include <linux/utsname.h>
27
26
28
27
#include "errno.h"
29
28
#include "stdarg.h"
@@ -894,32 +893,6 @@ int umount2(const char *path, int flags)
894
893
}
895
894
896
895
897
- /*
898
- * int uname(struct utsname *buf);
899
- */
900
-
901
- struct utsname {
902
- char sysname [65 ];
903
- char nodename [65 ];
904
- char release [65 ];
905
- char version [65 ];
906
- char machine [65 ];
907
- char domainname [65 ];
908
- };
909
-
910
- static __attribute__((unused ))
911
- int sys_uname (struct utsname * buf )
912
- {
913
- return my_syscall1 (__NR_uname , buf );
914
- }
915
-
916
- static __attribute__((unused ))
917
- int uname (struct utsname * buf )
918
- {
919
- return __sysret (sys_uname (buf ));
920
- }
921
-
922
-
923
896
/*
924
897
* int unlink(const char *path);
925
898
*/
Original file line number Diff line number Diff line change
1
+ /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
2
+ /*
3
+ * Utsname definitions for NOLIBC
4
+ * Copyright (C) 2017-2021 Willy Tarreau <[email protected] >
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 ))
31
+ int sys_uname (struct utsname * buf )
32
+ {
33
+ return my_syscall1 (__NR_uname , buf );
34
+ }
35
+
36
+ static __attribute__((unused ))
37
+ int uname (struct utsname * buf )
38
+ {
39
+ return __sysret (sys_uname (buf ));
40
+ }
41
+
42
+ #endif /* _NOLIBC_SYS_UTSNAME_H */
You can’t perform that action at this time.
0 commit comments