Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3533

Ensure files referencing ssize_t include sys/types.h

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • libbson, libmongoc
    • None

    Description

      To define ssize_t on POSIX systems, sys/types.h should be included and Windows requires typedefs in bson-compat.h. Ensure that files in libmongoc that are referencing ssize_t are including both. Currently it appears that files in libmongoc get sys/types.h through bson.h => bson-types.h

      There are plenty of libmongoc source files that utilize ssize_t without directly including this <sys/types.h>. This appears to work because they all end up including
      bson.h, which in turn includes bson-types.h, which happens to include <sys/types.h>. But if a libmongoc source file was introduced that happened to use ssize_t and not depend on bson.h, it may lead to the a compilation error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kevin.albertson@mongodb.com Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: