The port builds just fine. There is only one part I am not sure about: I had to reimplement thread id retrieving (FreeBSD does not have __NR_gettid) and I am not sure if I did it correctly. I'd be grateful I someone could review it.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244562