X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiozone%2F0002-no-nptl-support.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiozone%2F0002-no-nptl-support.patch;h=493f52cc77ca7818017f7a979e8000ab7f566b35;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/iozone/0002-no-nptl-support.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/iozone/0002-no-nptl-support.patch new file mode 100644 index 0000000..493f52c --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/iozone/0002-no-nptl-support.patch @@ -0,0 +1,37 @@ +Dummy pthread_setaffinity_np() when not available + +On uClibc configurations that do not use the NPTL thread +implementation, pthread_setaffinity_np() is not available. This patch +defines a dummy (empty) implementation of this function for such +cases. + +The only few architectures that do not provide the NPTL thread +implementation are very likely to be non-SMP architectures, and +therefore, setting the affinity of the thread is not doing anything +useful, so having an empty stub for pthread_setaffinity_np() is not a +problem. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/current/iozone.c +=================================================================== +--- a/src/current/iozone.c ++++ b/src/current/iozone.c +@@ -306,6 +306,17 @@ + #endif + #endif + ++#if defined (__linux__) ++#include ++#if defined (__UCLIBC__) && !defined (__UCLIBC_HAS_THREADS_NATIVE__) ++static int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, ++ const cpu_set_t *cpuset) ++{ ++ return 0; ++} ++#endif ++#endif ++ + #if ((defined(solaris) && defined(__LP64__)) || defined(__s390x__)) + /* If we are building for 64-bit Solaris, all functions that return pointers + * must be declared before they are used; otherwise the compiler will assume