{"thread":{"id":"26886","subject":"[PATCH] Improve test for pthreads flag","startedAt":"2011-03-28T07:39:59Z","lastAt":"2011-03-28T07:39:59Z","messageCount":1,"participants":["Giuseppe Bilotta"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"164410","messageId":"1301297999-30130-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"26886","inReplyTo":null,"subject":"[PATCH] Improve test for pthreads flag","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2011-03-28T07:39:59Z","receivedAt":"2011-03-28T07:39:59Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"When compiling with CC=clang using Clang 1.1 as shipped by Debian\nunstable (package version 2.7-3), the -mt flag is sufficient to compile\nduring the `configure` test. However, building git would then fail at\nlink time complaining about missing symbols such as `pthread_key_create'\nand `pthread_create'.\n\nWork around this issue by adding pthread key creation to the pthreads\nconfigure test source.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n configure.ac |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex dd07907..fafd815 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -895,7 +895,9 @@ AC_LANG_PROGRAM([[\n #include <pthread.h>\n ]], [[\n \tpthread_mutex_t test_mutex;\n+\tpthread_key_t test_key;\n \tint retcode = 0;\n+\tretcode |= pthread_key_create(&test_key, (void *)0);\n \tretcode |= pthread_mutex_init(&test_mutex,(void *)0);\n \tretcode |= pthread_mutex_lock(&test_mutex);\n \tretcode |= pthread_mutex_unlock(&test_mutex);\n-- \n1.7.4.2.644.gb47dd1.dirty\n"}]}