Skip to content

Commit

Permalink
Declare pthread_attr_t only if it was not previously declared
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
  • Loading branch information
dmsck committed Nov 15, 2015
1 parent 909a090 commit c8c54e3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ndk/platforms/android-21/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ typedef struct {

#define PTHREAD_COND_INITIALIZER {0 __RESERVED_INITIALIZER}

#ifndef _PTHREAD_ATTR_T_DECLARED
typedef struct {
uint32_t flags;
void* stack_base;
Expand All @@ -93,6 +94,8 @@ typedef struct {
char __reserved[16];
#endif
} pthread_attr_t;
#define _PTHREAD_ATTR_T_DECLARED
#endif

typedef long pthread_mutexattr_t;
typedef long pthread_condattr_t;
Expand Down
3 changes: 3 additions & 0 deletions ndk/platforms/android-5/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ typedef struct
#define _PTHREAD_COND_T_DECLARED
#endif

#ifndef _PTHREAD_ATTR_T_DECLARED
typedef struct
{
uint32_t flags;
Expand All @@ -83,6 +84,8 @@ typedef struct
int32_t sched_policy;
int32_t sched_priority;
} pthread_attr_t;
#define _PTHREAD_ATTR_T_DECLARED
#endif

typedef long pthread_mutexattr_t;
typedef long pthread_condattr_t;
Expand Down
3 changes: 3 additions & 0 deletions ndk/platforms/android-8/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ typedef struct
#define _PTHREAD_COND_T_DECLARED
#endif

#ifndef _PTHREAD_ATTR_T_DECLARED
typedef struct
{
uint32_t flags;
Expand All @@ -83,6 +84,8 @@ typedef struct
int32_t sched_policy;
int32_t sched_priority;
} pthread_attr_t;
#define _PTHREAD_ATTR_T_DECLARED
#endif

typedef long pthread_mutexattr_t;
typedef long pthread_condattr_t;
Expand Down
3 changes: 3 additions & 0 deletions ndk/platforms/android-9/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ typedef struct
#define _PTHREAD_COND_T_DECLARED
#endif

#ifndef _PTHREAD_ATTR_T_DECLARED
typedef struct
{
uint32_t flags;
Expand All @@ -83,6 +84,8 @@ typedef struct
int32_t sched_policy;
int32_t sched_priority;
} pthread_attr_t;
#define _PTHREAD_ATTR_T_DECLARED
#endif

typedef long pthread_mutexattr_t;
typedef long pthread_condattr_t;
Expand Down

0 comments on commit c8c54e3

Please sign in to comment.