Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions abis/linux/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
#define AT_STATX_FORCE_SYNC 0x2000
#define AT_STATX_DONT_SYNC 0x4000
#define AT_STATX_SYNC_TYPE 0x6000
#define AT_RECURSIVE 0x8000

#endif /* __MLIBC_LINUX_OPTION && defined(_GNU_SOURCE) */

Expand Down
13 changes: 9 additions & 4 deletions abis/linux/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct sockaddr_in {
uint8_t sin_zero[8];
};

#if !__MLIBC_LINUX_OPTION || (!defined(_UAPI_LINUX_IN6_H) && !defined(_UAPI_IPV6_H))
#if !__UAPI_DEF_IN6_ADDR
struct in6_addr {
union {
uint8_t __s6_addr[16];
Expand All @@ -34,28 +34,33 @@ struct in6_addr {
#define s6_addr __in6_union.__s6_addr
#define s6_addr16 __in6_union.__s6_addr16
#define s6_addr32 __in6_union.__s6_addr32
#endif /* !__UAPI_DEF_IN6_ADDR */

#if !__UAPI_DEF_SOCKADDR_IN6
struct sockaddr_in6 {
sa_family_t sin6_family;
in_port_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id;
};
#endif /* !__UAPI_DEF_SOCKADDR_IN6 */

#if !__UAPI_DEF_IPV6_MREQ
struct ipv6_mreq {
struct in6_addr ipv6mr_multiaddr;
unsigned ipv6mr_interface;
};
#endif /* !__UAPI_DEF_IPV6_MREQ */

#if !__UAPI_DEF_IN6_PKTINFO
#if defined(_GNU_SOURCE)
struct in6_pktinfo {
struct in6_addr ipi6_addr;
uint32_t ipi6_ifindex;
};
#endif /* defined(_GNU_SOURCE) */

#endif /* !__MLIBC_LINUX_OPTION || (!defined(_UAPI_LINUX_IN6_H) && !defined(_UAPI_IPV6_H)) */
#endif /* !__UAPI_DEF_IN6_PKTINFO */

#if defined(_DEFAULT_SOURCE)
struct ip_mreq {
Expand Down Expand Up @@ -232,7 +237,7 @@ struct group_source_req {
#define __UAPI_DEF_SOCKADDR_IN 0

#define __UAPI_DEF_IN6_ADDR 0
#define __UAPI_DEF_IN6_ADDR_ALT 1
#define __UAPI_DEF_IN6_ADDR_ALT 0
#define __UAPI_DEF_IN6_PKTINFO 0
#define __UAPI_DEF_IP6_MTUINFO 0
#define __UAPI_DEF_IPPROTO_V6 0
Expand Down
5 changes: 5 additions & 0 deletions abis/linux/statx.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ struct statx_timestamp {
#define STATX_MNT_ID 0x1000
#define STATX_DIOALIGN 0x2000
#define STATX_ALL 0xfff
#define STATX_MNT_ID_UNIQUE 0x00004000U
#define STATX_SUBVOL 0x00008000U
#define STATX_WRITE_ATOMIC 0x00010000U
#define STATX_DIO_READ_ALIGN 0x00020000U

#define STATX_ATTR_COMPRESSED 0x4
#define STATX_ATTR_IMMUTABLE 0x10
Expand All @@ -41,6 +45,7 @@ struct statx_timestamp {
#define STATX_ATTR_MOUNT_ROOT 0x2000
#define STATX_ATTR_VERITY 0x100000
#define STATX_ATTR_DAX 0x200000
#define STATX_ATTR_WRITE_ATOMIC 0x00400000

struct statx {
__mlibc_uint32 stx_mask;
Expand Down
5 changes: 5 additions & 0 deletions options/linux/generic/linux-unistd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ int syncfs(int fd) {
}
return 0;
}

ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned int) {
__ensure(!"Not implemented");
__builtin_unreachable();
}
4 changes: 4 additions & 0 deletions options/linux/include/bits/linux/linux_unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ extern "C" {
#endif

#include <mlibc-config.h>
#include <bits/off_t.h>
#include <bits/size_t.h>
#include <bits/ssize_t.h>

#ifndef __MLIBC_ABI_ONLY

Expand All @@ -15,6 +18,7 @@ int vhangup(void);

#if defined(_GNU_SOURCE)
int syncfs(int __fd);
ssize_t copy_file_range(int __fd_in, off_t *__off_in, int __fd_out, off_t *__off_out, size_t __size, unsigned int __flags);
#endif

#endif /* !__MLIBC_ABI_ONLY */
Expand Down
2 changes: 2 additions & 0 deletions options/linux/include/sys/prctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
#define PR_CAP_AMBIENT_LOWER 3
#define PR_CAP_AMBIENT_CLEAR_ALL 4

#define PR_SET_MEMORY_MERGE 67

#ifndef __MLIBC_ABI_ONLY

#ifdef __cplusplus
Expand Down