Using libbsd-overlay through pkg-config allows accessing strlcpy/strlcat by including <string.h> and programming as if we're on BSD. This simplifies compatibility code massively.
My interest here is making OpenDKIM work with my libobsd library which I'm trying to get into OpenWRT at https://github.com/openwrt/openwrt/pull/9714. OpenDKIM is one of the programs my library needs to work with for that.
My library can act as an alternative to libbsd, and I'm trying to get others to use libbsd's libbsd-overlay mode over the normal libbsd mode because I think it leads to smaller, simpler, and cleaner code as evidenced by this PR.
I've build tested this on Alpine Linux and OpenBSD.
Using libbsd-overlay through pkg-config allows accessing
strlcpy
/strlcat
by including<string.h>
and programming as if we're on BSD. This simplifies compatibility code massively.My interest here is making OpenDKIM work with my libobsd library which I'm trying to get into OpenWRT at https://github.com/openwrt/openwrt/pull/9714. OpenDKIM is one of the programs my library needs to work with for that. My library can act as an alternative to libbsd, and I'm trying to get others to use libbsd's libbsd-overlay mode over the normal libbsd mode because I think it leads to smaller, simpler, and cleaner code as evidenced by this PR.
I've build tested this on Alpine Linux and OpenBSD.