[Openmp-commits] [openmp] 8b9a6af - [OpenMP] Add an 'stddef.h' include to 'omp.h' (#73876)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 29 16:53:36 PST 2023


Author: Joseph Huber
Date: 2023-11-29T18:53:30-06:00
New Revision: 8b9a6af4504a9a160bb1da0abced9c538b3af26b

URL: https://github.com/llvm/llvm-project/commit/8b9a6af4504a9a160bb1da0abced9c538b3af26b
DIFF: https://github.com/llvm/llvm-project/commit/8b9a6af4504a9a160bb1da0abced9c538b3af26b.diff

LOG: [OpenMP] Add an 'stddef.h' include to 'omp.h' (#73876)

Summary:
We use `size_t` internally in the omp.h header, which is normally
provided by `stdlib.h` which is already included. Howevever, some cases
when using `-ffreestanding` can result in this not being defined via
`stdlib.h`. This patch simply adds an explicit inclusion of this header,
which is provided by the `clang` resource directory, to resolve this in
all cases.

Added: 
    

Modified: 
    openmp/runtime/src/include/omp.h.var

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/include/omp.h.var b/openmp/runtime/src/include/omp.h.var
index 0dd3a533a365059..a1488ae9d21c616 100644
--- a/openmp/runtime/src/include/omp.h.var
+++ b/openmp/runtime/src/include/omp.h.var
@@ -15,6 +15,7 @@
 #ifndef __OMP_H
 #   define __OMP_H
 
+#   include <stddef.h>
 #   include <stdlib.h>
 #   include <stdint.h>
 


        


More information about the Openmp-commits mailing list