Ensure files referencing ssize_t include sys/types.h

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: libbson, libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: