Files
trapexit 25b0bc72df Fix dirent64::namelen calculation (#1538)
Worked fine on my machine where padding seemed to be all zeroed out
but that doesn't appear to be the case elsewhere.

Could try
https://codeberg.org/jbruchon/libjodycode/src/branch/master/dir.c#L92-L110
but needs to be tested.
2025-09-30 11:25:19 -05:00

26 lines
306 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
#include <cstring>
namespace fs
{
struct dirent64
{
public:
uint64_t ino;
int64_t off;
uint16_t reclen;
uint8_t type;
char name[];
public:
size_t
namelen() const
{
return ::strlen(name);
}
};
}