[libc-commits] [libc] [libc] Add backwards-compatibility macro to struct stat. (PR #182601)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Feb 24 12:55:37 PST 2026


================
@@ -57,6 +57,10 @@ TEST_F(LlvmLibcUtimesTest, ChangeTimesSpecific) {
   ASSERT_EQ(statbuf.st_mtim.tv_nsec,
             static_cast<long>(times[1].tv_usec * 1000));
 
+  // legacy way to check seconds
+  ASSERT_EQ(statbuf.st_atime, times[0].tv_sec);
+  ASSERT_EQ(statbuf.st_mtime, times[1].tv_sec);
----------------
michaelrj-google wrote:

this should check all three macros

https://github.com/llvm/llvm-project/pull/182601


More information about the libc-commits mailing list