--- include/net-snmp/library/system.h.orig	2010-03-25 18:06:26.000000000 +0300
+++ include/net-snmp/library/system.h	2010-11-22 21:51:43.843976465 +0300
@@ -59,6 +59,8 @@
      */
 #ifndef MSVC_PERL
 
+#ifdef WIN32
+
 #ifndef HAVE_READDIR
     /*
      * structure of a directory entry 
@@ -87,6 +89,7 @@
     NETSNMP_IMPORT
     int             closedir(DIR * dirp);
 #endif /* HAVE_READDIR */
+#endif /* WIN32 */
 
 #ifndef HAVE_GETTIMEOFDAY
     NETSNMP_IMPORT
