public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libgomp: Include <limits.h> early to avoid link failure with glibc 2.34
@ 2021-07-12  8:26 Florian Weimer
  2021-07-12 13:11 ` Florian Weimer
  2021-07-12 13:25 ` Jakub Jelinek
  0 siblings, 2 replies; 7+ messages in thread
From: Florian Weimer @ 2021-07-12  8:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: H.J. Lu, libc-alpha

<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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-13  7:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12  8:26 [PATCH] libgomp: Include <limits.h> early to avoid link failure with glibc 2.34 Florian Weimer
2021-07-12 13:11 ` Florian Weimer
2021-07-12 13:25 ` Jakub Jelinek
2021-07-12 13:42   ` Florian Weimer
2021-07-12 14:35     ` Florian Weimer
2021-07-12 15:29       ` Florian Weimer
2021-07-13  7:54         ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).