mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-05-05 09:57:21 +02:00
df4ef52c1d
statx() returns both 32-bit minor and major numbers. For both of them to fit into the 'dev_t' in 'struct stat', that needs to be 64 bits wide. The other uses of 'dev_t' in nolibc are makedev() and friends and mknod(). makedev() and friends are going to be adapted in an upcoming commit and mknod() will silently truncate 'dev_t' to 'unsigned int' in the kernel, similar to other libcs. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260404-nolibc-makedev-v2-4-456a429bf60c@weissschuh.net
35 lines
1.0 KiB
C
35 lines
1.0 KiB
C
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
|
|
/*
|
|
* Standard definitions and types for NOLIBC
|
|
* Copyright (C) 2017-2021 Willy Tarreau <w@1wt.eu>
|
|
*/
|
|
|
|
#ifndef _NOLIBC_STD_H
|
|
#define _NOLIBC_STD_H
|
|
|
|
/* Declare a few quite common macros and types that usually are in stdlib.h,
|
|
* stdint.h, ctype.h, unistd.h and a few other common locations. Please place
|
|
* integer type definitions and generic macros here, but avoid OS-specific and
|
|
* syscall-specific stuff, as this file is expected to be included very early.
|
|
*/
|
|
|
|
#include "stdint.h"
|
|
#include "stddef.h"
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* those are commonly provided by sys/types.h */
|
|
typedef uint64_t dev_t;
|
|
typedef uint64_t ino_t;
|
|
typedef unsigned int mode_t;
|
|
typedef signed int pid_t;
|
|
typedef unsigned int uid_t;
|
|
typedef unsigned int gid_t;
|
|
typedef unsigned long nlink_t;
|
|
typedef int64_t off_t;
|
|
typedef signed long blksize_t;
|
|
typedef signed long blkcnt_t;
|
|
typedef __kernel_time64_t time_t;
|
|
|
|
#endif /* _NOLIBC_STD_H */
|