"Problems" in quotes because, you know, this is IOCCC entry. You're taking a joke way to serious.
However, if somebody did a quick and dirty “make it compile” port (include winsock2.h instead and, possibly, replace some functions/argument types), I think that would create security vulnerabilities because the fopen on Windows might support using backslashes as path separators.
Even if it doesn’t, there’s UNC paths (https://en.wikipedia.org/wiki/Path_(computing)#Universal_Nam...) to worry about.
That made me wonder whether other OSes might have similar features. Reading https://pubs.opengroup.org/onlinepubs/007904975/basedefs/xbd..., I’m not sure that forbids Unix from doing something similar. It says
“A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash.”
That opens the door for doing special things for paths that start with //, for example by supporting “//machine:foo/bar/baz” on clusters.
".//machine:foo/bar/baz" - will it work if the dot is added at the beginning?
I noticed the check for "/." in the path and I chuckled.
I think if you strip all leading forward slashes and check for "/." then you may have it be "secure" on linux at least.
Your best bet for fixing this on windows is making sure the code never compiles on windows because god knows what on earth the path handling is like on windows.
Update: I fixed this on github.