with Paulo Pizarro's help i was able to compile sofia-sip with TLS support.
Im sendig the patch with the diffs. The changes where the following:

The hint that pekka gave was right, but that was sufficient to compile only
tport_tls.c, it was also needed to change tport_type_tls.c, the problem was
the __funct__ function that is not defined on windows and the acess function
that is not defined on windows either. So when this functions are used a
ifdef is used to compile with functions that are defined on windows ( _acess
for example ). There is also an ifdef to include io.h from windows.

Besides this there is the config.h file that must be edited, the following
macros must be defined to 1.

HAVE_TLS
HAVE_OPENSSL
HAVE_OPENSSL_TLS1_H

after applying the patch, defining the macros and linking the msvs project
with openssl it should compile just fine, at least here is compiling. Im
using here openssl-0.9.8i.

i would like to thank pekka again, your help was fundamental, i would waste
a lot of time to realize that the include order was generating the error. I
hope the patch helps.

Best regards

Tiago César Katcipis

On Wed, Nov 26, 2008 at 5:17 PM, Pekka Pessi <[EMAIL PROTECTED]> wrote:

> 2008/11/26 Tiago Katcipis <[EMAIL PROTECTED]>:
> > Im trying to compile sofia-sip on windows with TLS support and im having
> a
> > little trouble on doing that. When i include the tport_tls.c and the
> > tport_tls.h on the project i got the following error:
> >
> > C:\ARQUIVOS DE PROGRAMAS\MICROSOFT SDK\INCLUDE\winsock2.h(109) : error
> > C2011: 'fd_set' : 'struct' type redefinition
> > C:\ARQUIVOS DE PROGRAMAS\MICROSOFT SDK\INCLUDE\winsock2.h(144) : warning
> > C4005: 'FD_SET' : macro redefinition
> >         C:\ARQUIVOS DE PROGRAMAS\MICROSOFT SDK\INCLUDE\winsock.h(88) :
> see
> > previous definition of 'FD_SET'
>
> Looks like openssl includes winsock.h and sofia-sip/su_wait.h then
> includes <winsock2.h>. You can try to move
> sofia-sip includes before openssl, perhaps openssl then does not try
> to use <winsock.h>.
>
> > the error keeps going on saying that a lot of things are being redefined,
> i
> > dont changed anything...just added the files. I already tried to define
> > HAVE_TLS and HAVE_OPENSSL on the win32/config.h, but the error is the
> same.
> >
> > Can anyone tell me what im doing wrong, or at least give a hint, im kinda
> > lost? i did not find any doc on how to compile on win32 with TLS.
>
> Sorry, I don't think we have ever done win32 and tls compilation with
> sofia-sip.
>
> If you succeed, please keep us posted.
>
> --
> Pekka.Pessi mail at nokia.com
>



-- 
"it might be a profitable thing to learn Java, but it has no intellectual
value whatsoever" Alexander Stepanov

Attachment: winTLS.patch
Description: Binary data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to