Here's a patch that fills st_dev, and while we're at it st_rdev (which is the same value).
I've moved the implementation of samefile/sameopenfile/samestat from Lib/posixpath.py over to Lib/genericpath.py and then removed the implementation from Lib/ntpath.py, so those functions are now common. The same goes for tests - I've rearranged tests towards test_genericpath. I also removed _getfileinformation from Modules/posixmodule.c because it's no longer being used.

Hmm. test_macpath will now run the tests for samefile etc. macpath doesn't contain os.path.samefile. But in Modules/posixmodule.c I don't see any special cases for classic MacOS. Actually, I don't know how tests behave on classic MacOS.
Please update the documentation (availability, versionchanged).

> New changeset 3738d270c54a by Brian Curtin in branch 'default':
> st_dev/st_rdev should be unsigned long as dwVolumeSerialNumber, which it is
> set to, is a DWORD. This was fixed in #11939 and the overflow was
> mentioned in #10657 and seen by me on some machines.
> http://hg.python.org/cpython/rev/3738d270c54a
But than st_dev used as long in _pystat_fromstructstat(). Perhaps you should
check if st_dev is negative and then select
PyLong_FromLong/PyLong_FromLongLong or
PyLong_FromUnsignedLong/PyLong_FromUnsignedLongLong.