{"action":"created","issue":{"url":"https://api.github.com/repos/libevent/libevent/issues/325","repository_url":"https://api.github.com/repos/libevent/libevent","labels_url":"https://api.github.com/repos/libevent/libevent/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/libevent/libevent/issues/325/comments","events_url":"https://api.github.com/repos/libevent/libevent/issues/325/events","html_url":"https://github.com/libevent/libevent/issues/325","id":133828714,"number":325,"title":"Missing <windows.h> in tinytest_demo.c","user":{"login":"gvanem","id":945271,"avatar_url":"https://avatars.githubusercontent.com/u/945271?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanem","html_url":"https://github.com/gvanem","followers_url":"https://api.github.com/users/gvanem/followers","following_url":"https://api.github.com/users/gvanem/following{/other_user}","gists_url":"https://api.github.com/users/gvanem/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanem/subscriptions","organizations_url":"https://api.github.com/users/gvanem/orgs","repos_url":"https://api.github.com/users/gvanem/repos","events_url":"https://api.github.com/users/gvanem/events{/privacy}","received_events_url":"https://api.github.com/users/gvanem/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-15T22:08:56Z","updated_at":"2016-02-24T11:18:15Z","closed_at":"2016-02-24T11:14:52Z","body":"AFAICS, there is no `<windows.h>` in the compilation unit for `test/tinytest_demo.c`. \r\nThis was the link-errors from [TDM-gcc](http://tdm-gcc.tdragon.net/):\r\n```\r\ntinytest_demo.c: In function 'test_timeout':\r\ntinytest_demo.c:179:2: warning: implicit declaration of function 'Sleep' [-Wimplicit-function-declaration]\r\n  Sleep(5000);\r\n  ^\r\nWarning: resolving _Sleep by linking to _Sleep@4\r\nUse --enable-stdcall-fixup to disable these warnings\r\nUse --disable-stdcall-fixup to disable these fixups\r\n`_Sleep' referenced in section `.text' of MingW_obj/tinytest_demo.o: defined in discarded section `.text' of F:/MingW32/TDM-gcc/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/lib/../lib32/libkernel32.a(dgvms01140.o)\r\n```\r\n\r\nBut this simple patch fixed that:\r\n```\r\n--- a/test/tinytest_demo.c 2016-02-15 20:44:31\r\n+++ b/test/tinytest_demo.c 2016-02-15 23:03:05\r\n@@ -36,7 +36,9 @@\r\n #include <string.h>\r\n #include <errno.h>\r\n #include <time.h>\r\n-#ifndef _WIN32\r\n+#ifdef _WIN32\r\n+#include <windows.h>\r\n+#else\r\n #include <unistd.h>\r\n #endif\r\n```\r\n\r\nHow else is `<windows.h>` supposed to be included? What am I missing?"},"comment":{"url":"https://api.github.com/repos/libevent/libevent/issues/comments/188201408","html_url":"https://github.com/libevent/libevent/issues/325#issuecomment-188201408","issue_url":"https://api.github.com/repos/libevent/libevent/issues/325","id":188201408,"user":{"login":"azat","id":430798,"avatar_url":"https://avatars.githubusercontent.com/u/430798?v=3","gravatar_id":"","url":"https://api.github.com/users/azat","html_url":"https://github.com/azat","followers_url":"https://api.github.com/users/azat/followers","following_url":"https://api.github.com/users/azat/following{/other_user}","gists_url":"https://api.github.com/users/azat/gists{/gist_id}","starred_url":"https://api.github.com/users/azat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azat/subscriptions","organizations_url":"https://api.github.com/users/azat/orgs","repos_url":"https://api.github.com/users/azat/repos","events_url":"https://api.github.com/users/azat/events{/privacy}","received_events_url":"https://api.github.com/users/azat/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T11:18:15Z","updated_at":"2016-02-24T11:18:15Z","body":"@gvanem there are reasons for *pull-request* over *issue*\r\n- it includes a patch, and I can just merge it\r\n- we have build-bots (travis-ci/appveyor) that automatically runs over *pull-requests*, so we will know that there are no regressions\r\n\r\nThis time I picked you patch, thanks!"}}