]> granicus.if.org Git - libevent/commitdiff
MSVC does not provide S_ISDIR, so provide it manually.
authorPeter Rosin <peda@lysator.liu.se>
Wed, 25 May 2011 08:57:16 +0000 (10:57 +0200)
committerNick Mathewson <nickm@torproject.org>
Wed, 25 May 2011 23:44:06 +0000 (19:44 -0400)
sample/http-server.c

index 05dc165ec8f105b9f37c1d89e8428d2506271e40..75caa414e2bce4168ee3aa5f15470e52239c3293 100644 (file)
@@ -19,6 +19,9 @@
 #include <windows.h>
 #include <io.h>
 #include <fcntl.h>
+#ifndef S_ISDIR
+#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
+#endif
 #else
 #include <sys/stat.h>
 #include <sys/socket.h>