Hello Mr. Wang,

Does the patch below make the Net-SNMP source code build ? (You can also
obtain this patch by running the command svn diff -c18565
https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/branches/V5-5-patches
.)

Index: win32/net-snmp/net-snmp-config.h
===================================================================
--- win32/net-snmp/net-snmp-config.h    (revision 18564)
+++ win32/net-snmp/net-snmp-config.h    (revision 18565)
@@ -32,10 +32,15 @@
 /* #undef NETSNMP_ENABLE_IPV6 */

 /* Only use Windows API functions available on Windows 2000 SP4 or later.
- * We need at least SP1 for some IPv6 defines in ws2ipdef.h
+ * We need at least SP1 for some IPv6 defines in ws2ipdef.h.
+ * Only define _WIN32_WINNT when not being compiled with MSVC 6 without
PSDK
+ * because there is a bug in the MSVC 6 header <winsock.h> that causes
+ * inclusion of <winsock2.h>.
  */
+#if defined(HAVE_WIN32_PLATFORM_SDK) || !defined(_MSC_VER) || _MSC_VER >
1200
 #define _WIN32_WINNT 0x500 /*_WIN32_WINNT_WIN2K*/
 #define NTDDI_VERSION 0x05000400 /* NTDDI_WIN2KSP4 */
+#endif

 #define INSTALL_BASE "c:/usr"

Bart.

On Mon, Apr 26, 2010 at 7:25 AM, wdb <wan...@toyou.com.cn> wrote:

>  Hi Bart,
>
>    Thanks for your reply, I downloaded 5.5, and the includes directory is:
> net-snmp5.5/include.
>
> Would you like to give me more detail about this?
>
> Thank you very much,
> Daobang Wang.
>
> ----- Original Message -----
> *From:* Bart Van Assche <bvanass...@acm.org>
> *To:* wangdaobang <wan...@toyou.com.cn>
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Sent:* Friday, April 23, 2010 6:04 PM
> *Subject:* Re: net snmp, Compile error.
>
> 2010/4/22 wangdaobang <wan...@toyou.com.cn>
>
>>      I'm new here, would you like to help me about the net snmp compile
>> with vc6.0? the output is followed:
>> Compiling...
>> snmptest.c
>> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(49) :
>> error C2011: 'fd_set' : 'struct' type redefinition
>> [ ... ]
>>
>
> Which version of Net-SNMP have you tried to compile ? Which directories
> have been configured in MSVC 6 under Tools / Options / Directories / Include
> files ?
>
> Bart.
>
>
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to