jnr / jnr-posix

Java Posix layer
Other
241 stars 91 forks source link

jnr-posix tests failed with GLIBC 2.36 #186

Open Panxuefeng-loongson opened 1 year ago

Panxuefeng-loongson commented 1 year ago
public interface LinuxLibC extends UnixLibC {
    public int __fxstat(int version, int fd, @Out @Transient FileStat stat);
    public int __lxstat(int version, CharSequence path, @Out @Transient FileStat stat);
    public int __lxstat(int version, @NulTerminate @In ByteBuffer path, @Out @Transient FileStat stat);
    public int __xstat(int version, CharSequence path, @Out @Transient FileStat stat);
    public int __xstat(int version, @NulTerminate @In ByteBuffer path, @Out @Transient FileStat stat);
    public int __fxstat64(int version, int fd, @Out @Transient FileStat stat);
    public int __lxstat64(int version, CharSequence path, @Out @Transient FileStat stat);
    public int __lxstat64(int version, @NulTerminate @In ByteBuffer path, @Out @Transient FileStat stat);
    public int __xstat64(int version, CharSequence path, @Out @Transient FileStat stat);
    public int __xstat64(int version, @NulTerminate @In ByteBuffer path, @Out @Transient FileStat stat);
    public int posix_fadvise(int fd, @off_t long offset, @off_t long len, int advice);
}

for example, __fxstat64 exits in GLIBC 2.27,

loongson@loongson-pc:~$ nm -D /usr/lib/loongarch64-linux-gnu/libc.so.6 | grep  lxstat
00000000000ce150 T __lxstat
00000000000ce150 T __lxstat64

but don't exits in GLIBC 2.36

[panxuefeng@localhost ~]$ nm -D /usr/lib64/libc.so.6  | grep lxstat
[panxuefeng@localhost ~]$ nm -D /usr/lib64/libc.so.6  | grep lstat
00000000000d1370 W lstat@@GLIBC_2.36
00000000000d1370 W lstat64@@GLIBC_2.36

how to solve test failed with GLIBC 2.36?