Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17813

error: use of undeclared identifier 'strnlen'

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.1
    • Component/s: Build
    • ALL

      mongodb 3.0.0 and 3.0.1 do not compile on Mac OS X 10.6. The error is:

      src/mongo/bson/bsonelement.h:485:35: error: use of undeclared identifier 'strnlen'
                          size_t size = strnlen( fieldName(), maxLen - 1 );
                                        ^
      

      The problem is that strnlen was added to OS X in version 10.7, so to compile on previous systems you must either not use strnlen or must provide a compatibility implementation of it.

      The MacPorts project's ticket about this issue is https://trac.macports.org/ticket/47119

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            ryandesign Ryan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: