error: use of undeclared identifier 'strnlen'

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Ryan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: