Created attachment 206254 [details]
With GCC9, this patch is necessary because of:
/wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.16/router/src/routing/src/mysql_routing.cc: In function 'int unix_getpeercred(int, pid_t&, uid_t&)':
/wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.16/router/src/routing/src/mysql_routing.cc:221:16: error: aggregate 'unix_getpeercred(int, pid_t&, uid_t&)::ucred ucred' has incomplete type and cannot be defined
221 | struct ucred ucred;
/wrkdirs/usr/ports/databases/mysql80-server/work/mysql-8.0.16/router/src/routing/src/mysql_routing.cc:224:36: error: 'SO_PEERCRED' was not declared in this scope; did you mean 'SO_PEERLABEL'?
Since SO_PEERCRED is only available on Linux, don't use this code path.
This should be fixed when https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239648 is committed.
(In reply to Piotr Kubaj from comment #1)
> This should be fixed when https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239648 is committed.
Give it a try now; the issue should have been resolved upstream
and in all relevant FreeBSD ports now.