Opened 7 years ago

Closed 7 years ago

#54361 closed defect (fixed)

libopenraw @0.1.2_0: error: use of undeclared identifier 'strnlen'

Reported by: kencu (Ken) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard snowleopard Cc:
Port: libopenraw

Description

Common problem:

./ifdentry.hpp:118:30: error: use of undeclared identifier 'strnlen'
    s.assign((const char*)b, strnlen((const char*)b, len));
                             ^

There are different ways to fix it. I used my snowleopardfixes port <https://github.com/kencu/snowleopardfixes> as it takes 10 seconds to fix that way, and with this, the build succeeds.

$ port -v installed libopenraw
The following ports are currently installed:
  libopenraw @0.1.0_1+gnome platform='darwin 10' archs='x86_64' date='2017-01-10T19:16:04-0800'
  libopenraw @0.1.2_0+gnome (active) platform='darwin 10' archs='x86_64' date='2017-06-21T10:38:21-0700'

You could also patch in the missing function to the files that need it.

Of course, the proper fix would be for upstream to test for it and include it if needed, if they are interested in that.

Change History (3)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dbevans removed
Keywords: tiger leopard added
Owner: set to dbevans
Status: newassigned
Summary: libopenraw @0.1.2_0 fails to build on 10.6 (and all platforms < 10.7, no doubt) due to missing strnlen functionlibopenraw @0.1.2_0: error: use of undeclared identifier 'strnlen'

comment:3 Changed 7 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.