Although newlib headers define most pthreads types, pthread_attr_t is not available. Macro-replace it by 'void' to keep the prototype of gomp_init_thread_affinity unchanged, and do not declare gomp_thread_attr.
* libgomp.h: Define pthread_attr_t to void on NVPTX. --- libgomp/libgomp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index d51b08b..f4255b4 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -510,8 +510,13 @@ static inline struct gomp_task_icv *gomp_icv (bool write) return &gomp_global_icv; } +#ifdef __nvptx__ +/* pthread_attr_t is not provided by newlib on NVPTX. */ +#define pthread_attr_t void +#else /* The attributes to be used during thread creation. */ extern pthread_attr_t gomp_thread_attr; +#endif /* Function prototypes. */