diff options
Diffstat (limited to 'libpthread/nptl/pthread_attr_destroy.c')
-rw-r--r-- | libpthread/nptl/pthread_attr_destroy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpthread/nptl/pthread_attr_destroy.c b/libpthread/nptl/pthread_attr_destroy.c index a30df0c45..b8d9a20d3 100644 --- a/libpthread/nptl/pthread_attr_destroy.c +++ b/libpthread/nptl/pthread_attr_destroy.c @@ -22,6 +22,7 @@ #include <string.h> #include <unistd.h> #include "pthreadP.h" +#include <shlib-compat.h> int __pthread_attr_destroy (attr) @@ -32,6 +33,11 @@ __pthread_attr_destroy (attr) assert (sizeof (*attr) >= sizeof (struct pthread_attr)); iattr = (struct pthread_attr *) attr; +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) + /* In old struct pthread_attr, neither next nor cpuset are + present. */ + if (__builtin_expect ((iattr->flags & ATTR_FLAG_OLDATTR), 0) == 0) +#endif /* The affinity CPU set might be allocated dynamically. */ free (iattr->cpuset); |