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

implicit declaration of function 'aligned_alloc'

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.23.3
    • Component/s: BSON
    • Labels:
      None

      Summary

      src/libbson/src/bson/bson-memory.c:38:11: error: implicit declaration of function 'aligned_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
         return aligned_alloc (alignment, num_bytes);
                ^
      src/libbson/src/bson/bson-memory.c:38:11: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Werror,-Wint-conversion]
         return aligned_alloc (alignment, num_bytes);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2 errors generated.

      Environment

      mongo-c-driver 1.23.3

      macOS 10.14.x x86_64

      Apple LLVM version 10.0.1 (clang-1001.0.46.4)

      How to Reproduce

      Build mongo-c-driver on macOS 10.14.x with clang from Xcode 10.3

      Additional Background

      It builds fine with macOS 10.15.x and Xcode 11.7 and later macOS/Xcode combinations, but not on macOS 10.14.x and Xcode 10.3 and earlier macOS/Xcode combinations. 

            Assignee:
            ezra.chung@mongodb.com Ezra Chung
            Reporter:
            ryandesign Ryan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: