[PATCH] libgomp: Include <limits.h> early to avoid link failure with glibc 2.34
Florian Weimer
fweimer@redhat.com
Mon Jul 12 08:26:47 GMT 2021
<limits.h> is included indirectly in the #pragma GCC visibility hidden
block. With glibc 2.34, <limits.h> needs a declaration of the sysconf
function, and including it under hidden visibility turns other calls
to sysconf into hidden references, leading to a linker failure.
libgomp/ChangeLog:
* libgomp.h: Include <limits.h>.
---
libgomp/libgomp.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 8d25dc8e2a8..1fe209429d1 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -46,6 +46,7 @@
#include "libgomp-plugin.h"
#include "gomp-constants.h"
+#include <limits.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
More information about the Libc-alpha
mailing list