i'm trying build code base , got error
"error: expected identifier before numeric constant "
in generated c file while building
and line number refers rw_offsetof( struct __pthread_mutex_s, 1 ),
sizeof( pthread_attr_t ), sizeof(((pthread_attr_t *)rw_ue_null)->__size ), sizeof( struct __pthread_internal_slist ), rw_offsetof( struct __pthread_internal_slist, __next ), sizeof( struct __pthread_mutex_s ), rw_offsetof( struct __pthread_mutex_s, __lock ), rw_offsetof( struct __pthread_mutex_s, __count ), rw_offsetof( struct __pthread_mutex_s, __owner ), rw_offsetof( struct __pthread_mutex_s, __kind ), rw_offsetof( struct __pthread_mutex_s, __nusers ), rw_offsetof( struct __pthread_mutex_s, 1 ), sizeof( pthread_mutex_t ), sizeof(((pthread_mutex_t *)rw_ue_null)->__size ), sizeof( pthread_mutexattr_t ), sizeof(((pthread_mutexattr_t *)rw_ue_null)->__size ), sizeof( pthread_cond_t ), sizeof(((pthread_cond_t *)rw_ue_null)->__size ), sizeof( pthread_condattr_t ), sizeof(((pthread_condattr_t *)rw_ue_null)->__size ), sizeof( sem_t ), sizeof(((sem_t *)rw_ue_null)->__size ), i found __pthread_mutex_s defined in pthreadtypes.h
typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[__sizeof_pthread_mutex_t]; long int __align; } pthread_mutex_t; as system file, how can cause problem ??
the second parameter rw_offsetof should name of field within struct named in first parameter. usage in line 1367 looks correct, in line 1368 have literal constant 1 instead of name of field, hence error.
without more context it's hard tell how error occurred, best guess have preprocessor macro somewhere same name field in __pthread_mutex_s (e.g. __count or __list), , macro #defined 1.
Comments
Post a Comment