glibc/glibc-RHEL-82285.patch

45 lines
1.6 KiB
Diff

External ABI adjustment for pthread_cond_t. This downstream-only
patch is necessary because upstream unfortunately changed the
definition of pthread_cond_t on release branches. The definition
of pthread_cond_t is semi-opaque, but ABI analysis tooling does
not know that. Changing the definition results in incorrect
ABI change errors if application uses pthread_cond_t at any
ABI boundary.
This patch reverts the installed header changes in
glibc-upstream-2.39-188.patch and glibc-upstream-2.39-193.patch.
Furthermore, use __glibc_unused___g_refs to match RHEL 9.
diff --git a/sysdeps/nptl/bits/thread-shared-types.h b/sysdeps/nptl/bits/thread-shared-types.h
index bccc2003ec6dea5c..1d325f58883db08d 100644
--- a/sysdeps/nptl/bits/thread-shared-types.h
+++ b/sysdeps/nptl/bits/thread-shared-types.h
@@ -95,12 +95,11 @@ struct __pthread_cond_s
{
__atomic_wide_counter __wseq;
__atomic_wide_counter __g1_start;
- unsigned int __g_size[2] __LOCK_ALIGNMENT;
+ unsigned int __glibc_unused___g_refs[2] __LOCK_ALIGNMENT;
+ unsigned int __g_size[2];
unsigned int __g1_orig_size;
unsigned int __wrefs;
unsigned int __g_signals[2];
- unsigned int __unused_initialized_1;
- unsigned int __unused_initialized_2;
};
typedef unsigned int __tss_t;
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index e0f24418fe4233f0..3d4f4a756c66750d 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -152,7 +152,7 @@ enum
/* Conditional variable handling. */
-#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, 0, 0, {0, 0}, 0, 0 } }
+#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
/* Cleanup buffers */