For something like fchmod on AF_UNIX files, there's no workaround. The behavior is different across platforms, and you either live with it or don't bother trying to use it at all.
For missing features, like a CMSG_SPACE macro, you either provide your own or don't use them.
For broken behavior, like pselect on OS X, NetBSD, and OpenBSD, or the littany of OS X bugs which come and go every release, what can you do? You can't easily paper over system interfaces. Usually they're system interfaces precisely because they couldn't be done from user-land well or at all.
In all cases, I found autotools and it's framework for compile-time introspection to be no better than other, dependency-less techniques. Long story short, the cost+benefit isn't there for autotools anymore. IME. C and POSIX conformance has crossed a threshold where you can deal with each individual issue without involving a framework.
Rather than spend my time writing code to check for these errors, where practical I instead submit bug patches to all the relevant projects. It's harder for Apple, but not impossible. I've submitted a fix to a conformance issue with htons and htonl which quickly made it into the next release, for example.