mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel+LibC: Share definitions for utsname.h
This commit is contained in:
parent
c65a735d71
commit
d794ed1de7
Notes:
sideshowbarker
2024-07-18 06:54:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d794ed1de7a
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/stat.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/termios.h>
|
||||
#include <Kernel/API/POSIX/time.h>
|
||||
|
@ -118,16 +119,6 @@ struct timeval {
|
|||
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 {
|
||||
void* iov_base;
|
||||
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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define UTSNAME_ENTRY_LEN 65
|
||||
#include <Kernel/API/POSIX/sys/utsname.h>
|
||||
|
||||
__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*);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Reference in a new issue