BSD OSes do not have compatibility for Linux capabilities - capabilities(7) thus loolwsd cannot be build there. Using Linux caps in loolwsd is only (though important) security enhancement. Let BSD OSes have ability to at least build easy loolwsd. (OpenBSD has pledge - http://man.openbsd.org/OpenBSD-current/man2/pledge.2 - which restricts system operations, not sure if it can fully replace dropCapabilities in loolwsd but let BSD OSes to take care about this themselves.) Thus, the code should have conditions which won't force Linux caps if not running on Linux.
IIUC loolwsd should be run as 'lool' user and thus Linux caps are used to grant this unprivileged process superuser permissions/capabilities. Am I right? If so, then BSD OSes would need to either run loolwsd as root (stupid) or modity loolwsd code to mimic granted superuser permissions/capabilities provide via Linux caps (eg. sudo/doas). Am I right?
It is not interesting for me, to run loolwsd on BSD OSes. Of course patches are welcome.
The reason we have capabilities is to be able to implement our container system; while the loolwsd process doesn't need privileges - it just handles socket data - then loolforkit process - has to be able to fork, and chroot to isolate its children. That requires various capabilities - which are of course dropped after their use. It would be possible to make loolforkit a suid binary - and to ensure that that is dropped after forking. However - the forked process links and pre-initializes a big chunk of LibreOffice code - which is perhaps not ideal in a 'root' process either: up to you really. Patches most welcome as always from BSD-ers =)