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

Ensure files referencing ssize_t include sys/types.h

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: libbson, libmongoc
    • None

      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.

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

              Created:
              Updated: