{"thread":{"id":"29190","subject":"[PATCH] grep.h: Fix compilation error on mingw","startedAt":"2011-12-16T22:56:22Z","lastAt":"2011-12-16T22:56:22Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"181349","messageId":"4EEBCC96.3010901@ramsay1.demon.co.uk","threadId":"29190","inReplyTo":null,"subject":"[PATCH] grep.h: Fix compilation error on mingw","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-12-16T22:56:22Z","receivedAt":"2011-12-16T22:56:22Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, gcc complains as follows:\n\n        CC bisect.o\n    In file included from revision.h:5,\n                     from bisect.c:4:\n    grep.h:138: error: expected '=', ',', ';', 'asm' or \\\n        '__attribute__' before 'grep_attr_mutex'\n    make: *** [bisect.o] Error 1\n\nIn order to fix the error, we include the 'thread-utils.h' header\nfile in grep.h, since it provides a definition of pthread_mutex_t\n(indirectly via compat/win32/pthread.h).\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Thomas,\n\nIf you need to re-roll your grep-threading series, could you please\nsquash this patch into your commit 53f4b6f7 (grep: enable threading\nwith -p and -W using lazy attribute lookup, 12-12-2011).\n\n[Note: you could also remove the '#include \"thread-utils.h\"' in both\ngrep.c and builtin/grep.c, since it is now included from grep.h.]\n\nThanks!\n\nATB,\nRamsay Jones\n\n grep.h |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/grep.h b/grep.h\nindex 15d227c..b6f06cb 100644\n--- a/grep.h\n+++ b/grep.h\n@@ -8,6 +8,7 @@ typedef int pcre;\n typedef int pcre_extra;\n #endif\n #include \"kwset.h\"\n+#include \"thread-utils.h\"\n \n enum grep_pat_token {\n \tGREP_PATTERN,\n-- \n1.7.8\n"}]}