Skip to content

Commit

Permalink
[OpenMP] Add an 'stddef.h' include to 'omp.h' (#73876)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jhuber6 committed Nov 30, 2023
1 parent 8a4b903 commit 8b9a6af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openmp/runtime/src/include/omp.h.var
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#ifndef __OMP_H
# define __OMP_H

# include <stddef.h>
# include <stdlib.h>
# include <stdint.h>

Expand Down

0 comments on commit 8b9a6af

Please sign in to comment.