X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpcsc-lite%2F0001-pthread-needed-for-libusb.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fpcsc-lite%2F0001-pthread-needed-for-libusb.patch;h=acb777aa44e3a9e75e09f707b1e81e229edae80a;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/pcsc-lite/0001-pthread-needed-for-libusb.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/pcsc-lite/0001-pthread-needed-for-libusb.patch new file mode 100644 index 0000000..acb777a --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/pcsc-lite/0001-pthread-needed-for-libusb.patch @@ -0,0 +1,29 @@ +configure.ac: explicitly add pthread cflags/libs in the libusb test + +If libusb-config does not exist, LIBUSB_CFLAGS and PTHREAD_CFLAGS will be +empty, and the test for libusb will be performed without additional flags. +However, when libusb needs threads, some extra flags are needed (depending +on the platform), like -pthreads, -lpthread, etc. Without these flags, the +test for libusb_init() will fail to link correctly, and pcsc-lite will fail +detecting libusb. + +Signed-off-by: Thomas De Schampheleire + +Upstream-status: will be submitted + +--- + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -254,8 +254,8 @@ if test "x$use_libusb" != xno ; then + saved_CPPFLAGS="$CPPFLAGS" + saved_LIBS="$LIBS" + +- CPPFLAGS="$CPPFLAGS $LIBUSB_CFLAGS" +- LIBS="$LDFLAGS $LIBUSB_LIBS" ++ CPPFLAGS="$CPPFLAGS $LIBUSB_CFLAGS $PTHREAD_CFLAGS" ++ LIBS="$LDFLAGS $LIBUSB_LIBS $PTHREAD_LIBS" + + AC_CHECK_HEADERS(libusb.h, [], + [ AC_MSG_ERROR([libusb.h not found, use ./configure LIBUSB_CFLAGS=...]) ])