[MacPorts] #51708: libassuan @2.4.2 does not build on PPC Tiger, Mac OS X 10.4.11 because of macro INADDR_LOOPBACK inside #ifndef _POSIX_C_SOURCE

MacPorts noreply at macports.org
Fri Aug 26 21:16:54 PDT 2016


#51708: libassuan @2.4.2 does not build on PPC Tiger, Mac OS X 10.4.11 because of
macro INADDR_LOOPBACK inside #ifndef _POSIX_C_SOURCE
------------------------------+---------------------------
  Reporter:  Peter_Dyballa@…  |      Owner:  larryv@…
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.3.4
Resolution:                   |   Keywords:  powerpc tiger
      Port:  libassuan        |
------------------------------+---------------------------

Comment (by kenneth.f.cunningham@…):

 Editing <netinet/in.h> is an interesting idea I hadn't considered before,
 but it is admittedly tempting... blasphemy to edit the system SDK of
 course, and all manner of unpredictably bad things might happen. However,
 updating the header files in Tiger to the version that includes
 _DARWIN_C_SOURCE in the guards would fix some ports broken on Tiger,
 including libassuan.

 And indeed, changing that one line in <netinet/in.h> from this
 {{{
   309   #ifndef _POSIX_C_SOURCE
  }}}
 to this
 {{{
   309   #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
  }}}

 allows libassuan to build. and would seem to me to be likely to be
 irrelevant to the Tiger SDK, looking at how the guard works, and thinking
 about all the darwin systems that followed it that use that guard.

 The only other visible option, of somehow undefining _POSIX_C_SOURCE to
 make the guard succeed, sounds like it would cause a lot more trouble and
 may not even be possible... And otherwise you're into piecemealing in the
 missing #defines like I did previously.

 I'm very tempted at the moment to (backup the /usr/include directory, of
 course) and then do a global search and replace on the whole Tiger
 /usr/include/* directory for that line and then see what then works and
 what breaks --  if anything breaks...I would hazard a bet that nothing
 breaks, although it would all be untested territory, to be sure --
 although I can't help but think that someone must have thought to do this
 before.

-- 
Ticket URL: <https://trac.macports.org/ticket/51708#comment:5>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list