xref: /netbsd-src/sys/compat/linux/arch/aarch64/linux_types.h (revision abbc8a65e23054d25cf7067e2df63d999881954c)
1 /*	$NetBSD: linux_types.h,v 1.1 2021/09/23 06:56:27 ryo Exp $ */
2 
3 /*-
4  * Copyright (c) 2021 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef _AARCH64_LINUX_TYPES_H
30 #define _AARCH64_LINUX_TYPES_H
31 
32 typedef long linux_off_t;
33 typedef long linux_clock_t;
34 typedef long linux_time_t;
35 typedef long linux_suseconds_t;
36 typedef unsigned int linux_uid_t;
37 typedef unsigned int linux_gid_t;
38 typedef int linux_pid_t;
39 typedef unsigned int linux_mode_t;
40 typedef unsigned int linux_nlink_t;
41 typedef unsigned long linux_dev_t;
42 typedef unsigned long linux_ino_t;
43 typedef int linux_timer_t;
44 
45 /* From linux_termios.h */
46 typedef unsigned char linux_cc_t;
47 typedef unsigned int linux_speed_t;
48 typedef unsigned int linux_tcflag_t;
49 
50 struct linux_stat {
51 	linux_dev_t	lst_dev;
52 	linux_ino_t	lst_ino;
53 	linux_mode_t	lst_mode;
54 	linux_nlink_t	lst_nlink;
55 	linux_uid_t	lst_uid;
56 	linux_gid_t	lst_gid;
57 	linux_dev_t	lst_rdev;
58 	unsigned long	__pad1;
59 	long		lst_size;
60 	int		lst_blksize;
61 	int		__pad2;
62 	long		lst_blocks;
63 	long		lst_atime;
64 	unsigned long	lst_atime_nsec;
65 	long		lst_mtime;
66 	unsigned long	lst_mtime_nsec;
67 	long		lst_ctime;
68 	unsigned long	lst_ctime_nsec;
69 	unsigned int	__unused4;
70 	unsigned int	__unused5;
71 };
72 
73 struct linux_stat64 {
74 	linux_dev_t	lst_dev;
75 	linux_ino_t	lst_ino;
76 	linux_mode_t	lst_mode;
77 	linux_nlink_t	lst_nlink;
78 	linux_uid_t	lst_uid;
79 	linux_gid_t	lst_gid;
80 	linux_dev_t	lst_rdev;
81 	unsigned long	__pad1;
82 	long		lst_size;
83 	int		lst_blksize;
84 	int		__pad2;
85 	long		lst_blocks;
86 	long		lst_atime;
87 	unsigned long	lst_atime_nsec;
88 	long		lst_mtime;
89 	unsigned long	lst_mtime_nsec;
90 	long		lst_ctime;
91 	unsigned long	lst_ctime_nsec;
92 	unsigned int	__unused4;
93 	unsigned int	__unused5;
94 };
95 
96 #endif /* !_AARCH4_LINUX_TYPES_H */
97