mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
Kernel+LibC: Share definitions for sys/time.h
This commit is contained in:
parent
35b52338bb
commit
6b6eca0631
3 changed files with 24 additions and 15 deletions
22
Kernel/API/POSIX/sys/time.h
Normal file
22
Kernel/API/POSIX/sys/time.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
struct timeval {
|
||||||
|
time_t tv_sec;
|
||||||
|
suseconds_t tv_usec;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -22,6 +22,7 @@
|
||||||
#include <Kernel/API/POSIX/sys/mman.h>
|
#include <Kernel/API/POSIX/sys/mman.h>
|
||||||
#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/time.h>
|
||||||
#include <Kernel/API/POSIX/sys/times.h>
|
#include <Kernel/API/POSIX/sys/times.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/utsname.h>
|
||||||
|
@ -51,14 +52,6 @@ typedef u8 __u8;
|
||||||
typedef int __s32;
|
typedef int __s32;
|
||||||
typedef short __s16;
|
typedef short __s16;
|
||||||
|
|
||||||
typedef u32 useconds_t;
|
|
||||||
typedef i32 suseconds_t;
|
|
||||||
|
|
||||||
struct timeval {
|
|
||||||
time_t tv_sec;
|
|
||||||
suseconds_t tv_usec;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct iovec {
|
struct iovec {
|
||||||
void* iov_base;
|
void* iov_base;
|
||||||
size_t iov_len;
|
size_t iov_len;
|
||||||
|
|
|
@ -6,17 +6,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <Kernel/API/POSIX/sys/time.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
struct timeval {
|
|
||||||
time_t tv_sec;
|
|
||||||
suseconds_t tv_usec;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct timezone {
|
struct timezone {
|
||||||
int tz_minuteswest;
|
int tz_minuteswest;
|
||||||
int tz_dsttime;
|
int tz_dsttime;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue