sahlberg / fuse-nfs

A FUSE module for NFSv3/4
GNU General Public License v3.0
172 stars 41 forks source link

Use the poll polyfill from win32/win32_compat.h from libnfs for windows builds #30

Closed Daniel-Abrecht closed 6 years ago

Daniel-Abrecht commented 6 years ago

Poll isn't available on windows, but the usage of the async apis needs it. libnfs has win32/win32_compat.{h,c} compatiblity files which provide a poll implementation. I've already checked that they would indeed work. The problem is, the win32/win32_compat.h header isn't included in libnfs.h, and it isn't in the "include/" folder in libnfs either. What would the best course of action be here? One possibillity would be to move win32/win32_compat.h to "include/win32/win32_compat.h" and include it in fuse-nfs.c. Another possibillity would be to include it in libnfs.h directly. An in either case, poll.h doesn't exist in windows, so an additional ifndef check should be added to fuse-nfs.c.

I can make pull requests for these changes, but I need to know what the prefered way to resolve this problem would be.

Daniel-Abrecht commented 6 years ago

I came to the conclusion that it would probably be the best to include win32/win32_compat.h in fuse/fuse-nfs.c. I'll now make the necessary pull requests.