git: 4d7a9535977f - stable/13 - linux(4): Move dev_t type declaration under /compat/linux

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Thu, 29 Jun 2023 08:20:22 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4d7a9535977fb450b97ec112d739d5563fbc166b

commit 4d7a9535977fb450b97ec112d739d5563fbc166b
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-04-28 08:55:02 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-06-29 08:15:36 +0000

    linux(4): Move dev_t type declaration under /compat/linux
    
    As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer
    on all platforms. Move it into the MI linux.h under /compat/linux.
    
    (cherry picked from commit 19973638bee2205be2a7eb07bc154b8afb1e44a3)
---
 sys/amd64/linux/linux.h   | 1 -
 sys/amd64/linux32/linux.h | 1 -
 sys/arm64/linux/linux.h   | 1 -
 sys/compat/linux/linux.h  | 5 +++++
 sys/i386/linux/linux.h    | 1 -
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index 81d9f48f6271..a5682c6a980d 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -54,7 +54,6 @@ typedef uint16_t	l_ushort;
 typedef l_ulong		l_uintptr_t;
 typedef l_long		l_clock_t;
 typedef l_int		l_daddr_t;
-typedef l_ulong		l_dev_t;
 typedef l_uint		l_gid_t;
 typedef l_ushort	l_gid16_t;
 typedef l_uint		l_uid_t;
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 02fcd320152d..9ad288e339df 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -63,7 +63,6 @@ typedef unsigned short	l_ushort;
 typedef l_ulong		l_uintptr_t;
 typedef l_long		l_clock_t;
 typedef l_int		l_daddr_t;
-typedef l_ushort	l_dev_t;
 typedef l_uint		l_gid_t;
 typedef l_ushort	l_gid16_t;
 typedef l_ulong		l_ino_t;
diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h
index a20b3c90a066..5a391c3543d3 100644
--- a/sys/arm64/linux/linux.h
+++ b/sys/arm64/linux/linux.h
@@ -49,7 +49,6 @@ typedef uint16_t	l_ushort;
 typedef l_ulong		l_uintptr_t;
 typedef l_long		l_clock_t;
 typedef l_int		l_daddr_t;
-typedef l_ulong		l_dev_t;
 typedef l_uint		l_gid_t;
 typedef l_ushort	l_gid16_t;	/* XXX */
 typedef l_uint		l_uid_t;
diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h
index 055d8e3b9cf6..9061548399e4 100644
--- a/sys/compat/linux/linux.h
+++ b/sys/compat/linux/linux.h
@@ -28,6 +28,11 @@
 #ifndef _LINUX_MI_H_
 #define _LINUX_MI_H_
 
+/*
+ * Machine independent set of types for the Linux types.
+ */
+typedef uint32_t	l_dev_t;
+
 /*
  * Private Brandinfo flags
  */
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 2ccb2f92ef22..32f92d8c637b 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -55,7 +55,6 @@ typedef char		*l_caddr_t;
 typedef l_ulong		l_uintptr_t;
 typedef l_long		l_clock_t;
 typedef l_int		l_daddr_t;
-typedef l_ushort	l_dev_t;
 typedef l_uint		l_gid_t;
 typedef l_ushort	l_gid16_t;
 typedef l_ulong		l_ino_t;