diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-02-20 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-02-20 08:00:00 +0000 |
commit | 9f9dd99da15e24cec598e8f0133adaf7781c7a14 (patch) | |
tree | 5860992c76bc69c754894be0fd8bcaba0a3d5237 /bundled | |
parent | 7074aba4a9ba8118724ce77b457afab9030416b0 (diff) | |
download | strace-9f9dd99da15e24cec598e8f0133adaf7781c7a14.tar.gz |
Switch to use bundled <linux/utsname.h>
* bundled/linux/include/uapi/linux/utsname.h: New file, copied from
headers_install'ed Linux kernel v5.11.
* bundled/Makefile.am (EXTRA_DIST): Add it.
* configure.ac (AC_CHECK_HEADERS): Remove linux/utsname.h.
* src/hostname.c: Include <linux/utsname.h> unconditionally, assume
__NEW_UTS_LEN is defined.
* tests/sethostname.c: Likewise.
* src/sysmips.c [MIPS]: Likewise.
Diffstat (limited to 'bundled')
-rw-r--r-- | bundled/Makefile.am | 1 | ||||
-rw-r--r-- | bundled/linux/include/uapi/linux/utsname.h | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/bundled/Makefile.am b/bundled/Makefile.am index e2d305fa7..f0e734bd5 100644 --- a/bundled/Makefile.am +++ b/bundled/Makefile.am @@ -64,6 +64,7 @@ EXTRA_DIST = \ linux/include/uapi/linux/types.h \ linux/include/uapi/linux/unix_diag.h \ linux/include/uapi/linux/userfaultfd.h \ + linux/include/uapi/linux/utsname.h \ linux/include/uapi/linux/v4l2-common.h \ linux/include/uapi/linux/v4l2-controls.h \ linux/include/uapi/linux/videodev2.h \ diff --git a/bundled/linux/include/uapi/linux/utsname.h b/bundled/linux/include/uapi/linux/utsname.h new file mode 100644 index 000000000..0e16e6147 --- /dev/null +++ b/bundled/linux/include/uapi/linux/utsname.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_UTSNAME_H +#define _LINUX_UTSNAME_H + +#define __OLD_UTS_LEN 8 + +struct oldold_utsname { + char sysname[9]; + char nodename[9]; + char release[9]; + char version[9]; + char machine[9]; +}; + +#define __NEW_UTS_LEN 64 + +struct old_utsname { + char sysname[65]; + char nodename[65]; + char release[65]; + char version[65]; + char machine[65]; +}; + +struct new_utsname { + char sysname[__NEW_UTS_LEN + 1]; + char nodename[__NEW_UTS_LEN + 1]; + char release[__NEW_UTS_LEN + 1]; + char version[__NEW_UTS_LEN + 1]; + char machine[__NEW_UTS_LEN + 1]; + char domainname[__NEW_UTS_LEN + 1]; +}; + + +#endif /* _LINUX_UTSNAME_H */ |