[Help-gnutls] Re: Help for Gnutls4win

Simon Josefsson simon at josefsson.org
Wed May 6 09:55:59 CEST 2009


"Yan, Patrick (NSN - CN/Beijing)" <patrick.yan at nsn.com> writes:

> Hi Simon,
>
> Thanks. That problem is resolved.
>
> But still need your help for the following errors. What's type for
> pid_t, is long? 

It doesn't exist on Windows, I think.  Try setting it to long and see if
it works.

Btw, rather than building it on Windows natively, you may try to use a
GnuTLS DLL built using mingw instead: http://josefsson.org/gnutls4win/
It includes DLLs for libgcrypt and libgpg-error as well.

/Simon

> Gcrypt.h: 
> line 217:ssize_t (*waitpid) (pid_t pid, int *status, int options);
>
>
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2146: syntax error : missing ')' before identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2146: syntax error : missing ';' before identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2061: syntax error : identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2059: syntax error : ')'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(218) : error
> C2365: 'accept' : redefinition; previous definition was 'function'
>         C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\include\winsock2.h(1523) : see declaration of
> 'accept'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(219) : error
> C2365: 'connect' : redefinition; previous definition was 'function'
>         C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\include\winsock2.h(1582) : see declaration of
> 'connect'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(231) : error
> C2059: syntax error : '}'
> packet-chlipx2.c
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2146: syntax error : missing ')' before identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2146: syntax error : missing ';' before identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2061: syntax error : identifier 'pid'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(217) : error
> C2059: syntax error : ')'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(218) : error
> C2365: 'accept' : redefinition; previous definition was 'function'
>         C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\include\winsock2.h(1523) : see declaration of
> 'accept'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(219) : error
> C2365: 'connect' : redefinition; previous definition was 'function'
>         C:\Program Files\Microsoft
> SDKs\Windows\v6.0A\include\winsock2.h(1582) : see declaration of
> 'connect'
> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(231) : error
> C2059: syntax error : '}'
> Generating Code...
>  
>
>>-----Original Message-----
>>From: ext Simon Josefsson [mailto:simon at josefsson.org] 
>>Sent: Wednesday, May 06, 2009 3:26 PM
>>To: Yan, Patrick (NSN - CN/Beijing)
>>Cc: help-gnutls at gnu.org
>>Subject: Re: Help for Gnutls4win
>>
>>"Yan, Patrick (NSN - CN/Beijing)" <patrick.yan at nsn.com> writes:
>>
>>> Hi helper-guntls:
>>>
>>> I want to added a protocol dissectors in wireshark, this 
>>dissectors need Gcrypt. But when I compliing the code, here is 
>>some make error related to Gcrypt. Would you help to check that. 
>>>
>>> I used gnutls-2.6.3. 
>>> OS is windows XP, wireshark source code is last version of 
>>wireshark-1.0.7. 
>>>  
>>> Checking for required applications:
>>>         cl: /cygdrive/c/Program Files/Microsoft Visual 
>>Studio 9.0/VC/BIN/cl
>>>         link: /cygdrive/c/Program Files/Microsoft Visual 
>>Studio 9.0/VC/BIN/link
>>>         nmake: /cygdrive/c/Program Files/Microsoft Visual 
>>Studio 9.0/VC/BIN/nmake
>>>         bash: /usr/bin/bash
>>>         bison: /usr/bin/bison
>>>         flex: /usr/bin/flex
>>>         env: /usr/bin/env
>>>         grep: /usr/bin/grep
>>>         /usr/bin/find: /usr/bin/find
>>>         perl: /usr/bin/perl
>>>         C:\Python26\python.exe: /cygdrive/c/Python26/python.exe
>>>         sed: /usr/bin/sed
>>>         unzip: /usr/bin/unzip
>>>         wget: /usr/bin/wget
>>>
>>> Here is the make error:
>>>
>>> packet-chlipx1.c
>>> C:\wireshark-libs-1.0\gnutls-2.6.3-1\include\gcrypt.h(206) : 
>>error C2061: syntax error : identifier 'ssize_t'
>>...
>>
>>The problem is that Windows doesn't have ssize_t.  Add 
>>'#define ssize_t long' or -Dssize_t=long somewhere in your 
>>build system.
>>
>>/Simon
>>





More information about the Gnutls-help mailing list