Bug 239627

Summary: databases/mysql80-server: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Mahdi Mokhtari <mmokhi>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: gerald, linimon, mmokhi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch pkubaj: maintainer-approval? (mmokhi)

Description Piotr Kubaj freebsd_committer freebsd_triage 2019-08-03 20:26:28 UTC
Created attachment 206254 [details]
patch

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.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2019-08-05 09:21:03 UTC
This should be fixed when https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239648 is committed.
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2019-08-14 07:18:03 UTC
(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.