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

error: use of undeclared identifier 'strnlen'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.1
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
    • Operating System:
      ALL

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: