[MacPorts] #68148: libgit2 @1.7.1: builds fail with xcode clang 6 and earlier: error: unknown type name 'inline', from legacy-support header 'dirent.h'

MacPorts noreply at macports.org
Tue Sep 12 15:21:02 UTC 2023


#68148: libgit2 @1.7.1: builds fail with xcode clang 6 and earlier: error: unknown
type name 'inline', from legacy-support header 'dirent.h'
----------------------+---------------------
  Reporter:  mascguy  |      Owner:  mascguy
      Type:  defect   |     Status:  closed
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.8.1
Resolution:  fixed    |   Keywords:
      Port:  libgit2  |
----------------------+---------------------
Description changed by mascguy:

Old description:

> Despite the project setting the C standard to 90 - which should (?) be
> sufficient - builds are failing due to keyword 'inline':
>
> {{{
> In file included from
> .../libgit2/work/libgit2-1.7.1/src/util/unix/posix.h:13:
> /opt/local/include/LegacySupport/dirent.h:60:8: error: unknown type name
> 'inline'
> static inline struct dirent *__mpls_readdir(DIR *dir) {
>        ^
> }}}
>
> More frustratingly, `libgit2-devel` was updated to to this version three
> weeks ago, and it built successfully across-the-board. (Including 10.5,
> based on local testing.) So it's not clear what else has changed in that
> short time.

New description:

 A recent addition to `legacy-support` added some functions declared
 inline, per PR:
 - [https://github.com/macports/macports-legacy-support/pull/61 PR 61 - Fix
 fdopendir so dirfd stays open until closedir (for fstatat etc)]

 However, upstream's project compiles with the C standard set to 90, which
 doesn't support keyword `inline`. Instead, compiling with C 99 or later is
 required.

 {{{
 In file included from
 .../libgit2/work/libgit2-1.7.1/src/util/unix/posix.h:13:
 /opt/local/include/LegacySupport/dirent.h:60:8: error: unknown type name
 'inline'
 static inline struct dirent *__mpls_readdir(DIR *dir) {
        ^
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/68148#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list