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.
|19 ↗||(On Diff #69098)|
There is no reason to zero errno here.
|22 ↗||(On Diff #69098)|
if (thr_self(&tid) <0 )…
or maybe just (if it links with pthreads)
dprintf(log_fd, "[%s][%s][%d] %s():%d ", timestr, logLevels[ll].descr, pthread_getthreadid_np(), fn, ln);
|23 ↗||(On Diff #69098)|
tid is already of type pid_t, no reason to cast it to pid_t again.