[libc-commits] [PATCH] D147738: [libc] Enable linux directory entries syscalls in riscv64

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Apr 11 15:46:00 PDT 2023


michaelrj added inline comments.


================
Comment at: libc/src/__support/File/dir.cpp:50
+  // returns a slightly different dirent struct:
+  struct linux_dirent {
+    unsigned long d_ino;
----------------
this struct should be moved to its own file in `include/llvm-libc-types/` to match `struct dirent`


================
Comment at: libc/src/__support/File/dir.cpp:56
+#endif
+    char d_name[1];
+    /*
----------------
you should probably add a comment clarifying that the 1 here represents the minimum width of this string, and that this struct has a variable length.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147738/new/

https://reviews.llvm.org/D147738



More information about the libc-commits mailing list