This is not a NetBSD bug. The POSIX/SUSvX whatever it is now is being more liberally interpreted by Linux as supporting directory fdatasync, but arguably this is incorrect. NetBSD interprets conditions and/or functionality like this quite a bit more strictly than Linux does, and does so (somewhat) independently and without working to be compatible with Linux. (At least, it has in the past. I have no idea if this is “intended” behaviour but it’s been around for a really long time and they tend to be reluctant to change POSIX-y behaviour without e.g. rulings from on high..)
I can fix whatever you’’d like me to fix, in whatever capacity you’d prefer, including fiddling with the logic inside leveldb but “The NetBSD Way” is to absolutely minimize the patches required to get software going on NetBSD in order to reduce load and etc on upstream and make patches palatable. I’m fine with whatever you guys think is best.