mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
Kernel+LibC: Share definitions for utsname.h
This commit is contained in:
parent
c65a735d71
commit
d794ed1de7
3 changed files with 30 additions and 22 deletions
27
Kernel/API/POSIX/sys/utsname.h
Normal file
27
Kernel/API/POSIX/sys/utsname.h
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Kernel/API/POSIX/sys/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define UTSNAME_ENTRY_LEN 65
|
||||||
|
|
||||||
|
struct utsname {
|
||||||
|
char sysname[UTSNAME_ENTRY_LEN];
|
||||||
|
char nodename[UTSNAME_ENTRY_LEN];
|
||||||
|
char release[UTSNAME_ENTRY_LEN];
|
||||||
|
char version[UTSNAME_ENTRY_LEN];
|
||||||
|
char machine[UTSNAME_ENTRY_LEN];
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -21,6 +21,7 @@
|
||||||
#include <Kernel/API/POSIX/sys/socket.h>
|
#include <Kernel/API/POSIX/sys/socket.h>
|
||||||
#include <Kernel/API/POSIX/sys/stat.h>
|
#include <Kernel/API/POSIX/sys/stat.h>
|
||||||
#include <Kernel/API/POSIX/sys/un.h>
|
#include <Kernel/API/POSIX/sys/un.h>
|
||||||
|
#include <Kernel/API/POSIX/sys/utsname.h>
|
||||||
#include <Kernel/API/POSIX/sys/wait.h>
|
#include <Kernel/API/POSIX/sys/wait.h>
|
||||||
#include <Kernel/API/POSIX/termios.h>
|
#include <Kernel/API/POSIX/termios.h>
|
||||||
#include <Kernel/API/POSIX/time.h>
|
#include <Kernel/API/POSIX/time.h>
|
||||||
|
@ -118,16 +119,6 @@ struct timeval {
|
||||||
suseconds_t tv_usec;
|
suseconds_t tv_usec;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define UTSNAME_ENTRY_LEN 65
|
|
||||||
|
|
||||||
struct utsname {
|
|
||||||
char sysname[UTSNAME_ENTRY_LEN];
|
|
||||||
char nodename[UTSNAME_ENTRY_LEN];
|
|
||||||
char release[UTSNAME_ENTRY_LEN];
|
|
||||||
char version[UTSNAME_ENTRY_LEN];
|
|
||||||
char machine[UTSNAME_ENTRY_LEN];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct iovec {
|
struct iovec {
|
||||||
void* iov_base;
|
void* iov_base;
|
||||||
size_t iov_len;
|
size_t iov_len;
|
||||||
|
|
|
@ -1,25 +1,15 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <Kernel/API/POSIX/sys/utsname.h>
|
||||||
|
|
||||||
#define UTSNAME_ENTRY_LEN 65
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
struct utsname {
|
|
||||||
char sysname[UTSNAME_ENTRY_LEN];
|
|
||||||
char nodename[UTSNAME_ENTRY_LEN];
|
|
||||||
char release[UTSNAME_ENTRY_LEN];
|
|
||||||
char version[UTSNAME_ENTRY_LEN];
|
|
||||||
char machine[UTSNAME_ENTRY_LEN];
|
|
||||||
};
|
|
||||||
|
|
||||||
int uname(struct utsname*);
|
int uname(struct utsname*);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue