Bug 208175

Summary: security/gnutls: Rename max_align_t definition conflicting with libc++
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Tijl Coosemans <tijl>
Status: Closed FIXED    
Severity: Affects Some People CC: bdrewery
Priority: --- Flags: bugzilla: maintainer-feedback? (bdrewery)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Rename conflicting max_align_t definition none

Description Dimitry Andric freebsd_committer 2016-03-21 10:15:45 UTC
Created attachment 168448 [details]
Rename conflicting max_align_t definition

In bug 208158, I asked for an exp-run with updated libc++.  It turns out that security/gnutls attempts to redefine max_align_t, which is also present in libc++'s copy of stddef.h, and this conflicts.

Since gnutls doesn't really use the type at all, I thought it was easiest to simply rename the type to gnu_max_align_t.  This avoids any compilation errors of C++ sources in gnutls.

Alternatively, the whole block defining max_align_t could be deleted, but that is a more invasive change, and I don't know how the configure script will handle that...
Comment 1 Tijl Coosemans freebsd_committer 2016-03-21 10:52:56 UTC
Just append ac_cv_type_max_align_t=yes to CONFIGURE_ARGS in the port Makefile.
Comment 2 Dimitry Andric freebsd_committer 2016-03-21 11:47:51 UTC
(In reply to Tijl Coosemans from comment #1)
> Just append ac_cv_type_max_align_t=yes to CONFIGURE_ARGS in the port
> Makefile.

If that prevents gnutls from rolling its own copy, then it is even better, yes.
Comment 3 commit-hook freebsd_committer 2016-03-21 12:04:32 UTC
A commit references this bug:

Author: tijl
Date: Mon Mar 21 12:03:40 UTC 2016
New revision: 411557
URL: https://svnweb.freebsd.org/changeset/ports/411557

Log:
  - Take maintainer.
  - Fix a build problem with upcoming libc++.

  PR:		207768, 208175
  Approved by:	bdrewery (maintainer)

Changes:
  head/security/gnutls/Makefile