[MacPorts] #61145: libvterm @0.1.2:error: implicit declaration of function 'strdup' is invalid in C99

MacPorts noreply at macports.org
Wed Sep 9 01:22:41 UTC 2020


#61145: libvterm @0.1.2:error: implicit declaration of function 'strdup' is invalid
in C99
------------------------+----------------------
  Reporter:  keke-cute  |      Owner:  raimue
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.6.99
Resolution:             |   Keywords:
      Port:  libvterm   |
------------------------+----------------------

Comment (by jmroot):

 No I think it's correct. Setting _XOPEN_SOURCE to 500 is equivalent to
 setting _POSIX_C_SOURCE to 199506, and strdup was only added to POSIX in
 POSIX.1-2001. Before that, strdup was an X/Open extension, and you had to
 define _XOPEN_SOURCE_EXTENDED to use it on systems that implemented those
 extensions. Understandably, Apple only implements the POSIX requirements
 and _XOPEN_SOURCE_EXTENDED does nothing on current macOS.

 I would assume pervious versions of clang were letting the implicit
 declaration through with a warning.

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


More information about the macports-tickets mailing list