From 19cc68d4a89b59889be442d2997ff030cdc3de73 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 20 Dec 2022 20:11:17 -0800
Subject: [PATCH] dirent-util: Remove asserts on dirent64 == dirent

We already have assert_cc(_FILE_OFFSET_BITS == 64) which ensures that 64bit LFS functions are same as their original counterparts

Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/25809]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/basic/dirent-util.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h
index 04bc53003f..4cb317184d 100644
--- a/src/basic/dirent-util.h
+++ b/src/basic/dirent-util.h
@@ -35,17 +35,6 @@ struct dirent *readdir_no_dot(DIR *dirp);
 /* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and
  * we want them to be interchangeable to make getdents64() work, hence verify that. */
 assert_cc(_FILE_OFFSET_BITS == 64);
-assert_cc(sizeof(struct dirent) == sizeof(struct dirent64));
-assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino));
-assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino));
-assert_cc(offsetof(struct dirent, d_off) == offsetof(struct dirent64, d_off));
-assert_cc(sizeof_field(struct dirent, d_off) == sizeof_field(struct dirent64, d_off));
-assert_cc(offsetof(struct dirent, d_reclen) == offsetof(struct dirent64, d_reclen));
-assert_cc(sizeof_field(struct dirent, d_reclen) == sizeof_field(struct dirent64, d_reclen));
-assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type));
-assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type));
-assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name));
-assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name));
 
 #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz)                           \
         for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz);        \
-- 
2.39.0

