mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-25 12:11:10 +00:00
nptl: Fix pthread_create.c build with clang
clang complains that libc_hidden_data_def (__nptl_threads_events) creates an invalid alias: pthread_create.c:50:1: error: alias must point to a defined variable or function libc_hidden_data_def (__nptl_threads_events) ^ ../include/libc-symbols.h:621:37: note: expanded from macro 'libc_hidden_data_def' It seems that clang requires that a proper prototype is defined prior the hidden alias creation. Reviewed-by: Fangrui Song <maskray@google.com>
This commit is contained in:
parent
8161978f89
commit
3d8b5dde87
@ -45,13 +45,15 @@
|
||||
|
||||
|
||||
/* Globally enabled events. */
|
||||
td_thr_events_t __nptl_threads_events;
|
||||
extern td_thr_events_t __nptl_threads_events;
|
||||
libc_hidden_proto (__nptl_threads_events)
|
||||
td_thr_events_t __nptl_threads_events;
|
||||
libc_hidden_data_def (__nptl_threads_events)
|
||||
|
||||
/* Pointer to descriptor with the last event. */
|
||||
struct pthread *__nptl_last_event;
|
||||
extern struct pthread *__nptl_last_event;
|
||||
libc_hidden_proto (__nptl_last_event)
|
||||
struct pthread *__nptl_last_event;
|
||||
libc_hidden_data_def (__nptl_last_event)
|
||||
|
||||
#ifdef SHARED
|
||||
|
Loading…
Reference in New Issue
Block a user