I see.  How about `alloca()` to allocate the buffer?

A working OS X version of lgetxattr would indeed be only for the aesthetics.  In order to make it compile, it should be sufficient to implement the function in platform_osx.h as `assert(false)`.