[MacPorts] #61032: udunits2: error: implicitly declaring library function 'strdup' with type 'char *(const char *)' [-Werror, -Wimplicit-function-declaration]

MacPorts noreply at macports.org
Sat Sep 19 09:52:42 UTC 2020


#61032: udunits2: error: implicitly declaring library function 'strdup' with type
'char *(const char *)' [-Werror,-Wimplicit-function-declaration]
------------------------------+----------------------
  Reporter:  caseyyoungflesh  |      Owner:  tenomoto
      Type:  defect           |     Status:  closed
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.6.3
Resolution:  fixed            |   Keywords:
      Port:  udunits2         |
------------------------------+----------------------

Comment (by chrstphrchvz):

 The warnings for `snprintf()` and `strdup()` can be dealt with by defining
 `_XOPEN_SOURCE` as `600` rather than `500`. But there is still a file with
 a deliberate implicit function declaration (parser.c uses `yylex()` at
 line 1394, but `yylex()` isn't defined until scanner.c is included at line
 2152); I'm not sure there's a better way of dealing with this than `-Wno-
 error=implicit-function-declaration`.

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


More information about the macports-tickets mailing list