diff --git a/libgcc/ChangeLog.omp b/libgcc/ChangeLog.omp index c46f49bf5b75..cf509a70d61f 100644 --- a/libgcc/ChangeLog.omp +++ b/libgcc/ChangeLog.omp @@ -1,3 +1,8 @@ +2023-01-24 Thomas Schwinge + + * config/nvptx/crt0.c [!HAVE_STDLIB_H]: Don't '#include '. + (atexit): Prototype. + 2023-01-20 Thomas Schwinge Andrew Stubbs diff --git a/libgcc/config/nvptx/crt0.c b/libgcc/config/nvptx/crt0.c index 860e2bfacadd..02648bef84bc 100644 --- a/libgcc/config/nvptx/crt0.c +++ b/libgcc/config/nvptx/crt0.c @@ -19,11 +19,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include +#include "auto-target.h" + +#ifdef HAVE_STDLIB_H +# include +#endif #include "gbl-ctors.h" int *__exitval_ptr; +extern int atexit (void (*function) (void)); extern void __attribute__((noreturn)) exit (int status); extern int main (int, void **);