[MacPorts] #68154: opensc @0.23.0: error: implicit declaration of function 'strnlen' is invalid in C99

MacPorts noreply at macports.org
Sun Sep 17 20:33:08 UTC 2023


#68154: opensc @0.23.0: error: implicit declaration of function 'strnlen' is
invalid in C99
-------------------------+-------------------------
  Reporter:  ryandesign  |      Owner:  mascguy
      Type:  defect      |     Status:  reopened
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.8.1
Resolution:              |   Keywords:  snowleopard
      Port:  opensc      |
-------------------------+-------------------------
Changes (by mascguy):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:4 jmroot]:
 > It doesn't look like this is actually fixed:
 https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/171680/steps
 /install-port/logs/stdio
 > {{{
 > openpgp-tool-helpers.c:200:24: warning: implicit declaration of function
 'strnlen' is invalid in C99 [-Wimplicit-function-declaration]
 >                 size_t used_length = strnlen(src, length) >> 1;
 >                                      ^
 > }}}
 > This file needs to `#include "common/compat_strnlen.h"`.

 Ah, yep, should have looked more closely.

 Thanks for the catch, will take care of this along with your other
 feedback. (The latter related to use of `_DARWIN_C_LEVEL`, etc.)

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


More information about the macports-tickets mailing list