-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readdir() fails in WSL with errno=75 #1337
Comments
What is content of PATH, WATCOM and INCLUDE environment variables? Anyway OW doesn't support symbolic links, that it must be installed on true path. Please how it looks like output from |
All looks OK. Did you tried created executable on "true" Linux? |
Yes, the build host does not affect behavior. Output binaries are identical regardless of host toolchain. I checked these things:
This means that errno=75 here is peculiar to the default My guess is that errno=75 is coming from the SYS_getdents call, perhaps because watcom defines a dirent that is different than glibc. Can you suggest some places for me to begin troubleshooting? -- Given that Open Watcom is the only compiler with this failure mode, I'm starting to look at the owc clib sources. |
If you are interested in fixing this issue then problem is probably in readdir C run-time library function implementation. |
Maybe it is bug in WSL for 32-bit application too. |
Bingo. I can get errno=75 with g++ if I force a 32-bit build, which makes this a platform bug and not a watcom bug. Thanks. |
I check internet and there is some info about WSL2 which should handle 32-bit application properly, but I cannot confirm if it is true. |
Thanks for identification source of problem. |
I will try to rewrite readdir to use getdents64 system call and if it data are in 32-bit range then pass it as result back otherwise report error EOVERFLOW |
The clib3 readdir() for Linux fails to access NTFS through the Windows Subsystem for Linux.
Platform:
Reproducer:
Expected behavior:
./readdir-test
prints a list of file names in the current working directory.Actual behavior:
./readdir-test
fails with readdir() returning NULL and settingerrno=75
if the underlying filesystem is NTFS on WSL.Notes:
g++
works as expected on WSL.readdir-test
program behaves properly if the underlying filesystem is vfat or a native filesystem like tmpfs.The text was updated successfully, but these errors were encountered: