On Mon, Jul 12, 2021 at 05:29:36PM +0200, Florian Weimer wrote: > I verifed that this change on top successfully builds GCC for all glibc > targets:
Here is what I've committed after testing overnight: 2021-07-13 Jakub Jelinek <ja...@redhat.com> Florian Weimer <fwei...@redhat.com> * config/linux/sem.h: Don't include limits.h. (SEM_WAIT): Define to -__INT_MAX__ - 1 instead of INT_MIN. * config/linux/affinity.c: Include limits.h. --- libgomp/config/linux/sem.h.jj 2021-01-18 07:18:42.360339646 +0100 +++ libgomp/config/linux/sem.h 2021-07-12 15:18:10.121178404 +0200 @@ -33,10 +33,8 @@ #ifndef GOMP_SEM_H #define GOMP_SEM_H 1 -#include <limits.h> /* For INT_MIN */ - typedef int gomp_sem_t; -#define SEM_WAIT INT_MIN +#define SEM_WAIT (-__INT_MAX__ - 1) #define SEM_INC 1 extern void gomp_sem_wait_slow (gomp_sem_t *, int); --- libgomp/config/linux/affinity.c.jj 2021-01-04 10:25:56.160037625 +0100 +++ libgomp/config/linux/affinity.c 2021-07-12 17:19:07.280429144 +0200 @@ -35,6 +35,7 @@ #include <stdio.h> #include <string.h> #include <unistd.h> +#include <limits.h> #ifdef HAVE_PTHREAD_AFFINITY_NP Jakub