[stunnel-users] connect error 0 running on ARM platform

Michal Trojnara Michal.Trojnara at mirt.net
Fri Jan 10 15:27:10 CET 2014

On 01/09/2014 06:02 PM, FX35 wrote:
>  Running stunnel 4.56 or 5.00 on an ARM platform (ARM926EJ) with Linux 
>, I encounter the following error : the call to connect() 
> return -1, but errno is set to 0 !
>  If stunnel is configured to use fork mode instead of pthread mode, 
> the problem disapear.
>  So it seems there is a problem, cross-compiling the program, with 
> errno or __errno_location() in the program generated with pthread.
>  I add the definition of _REENTRANT, without success ...
> (See $H1 at http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html)
>  Is somebody meet the same error ?

The errno definition in the Android framework (as an example of 
Linux/ARM platform) is:

    /* internal function returning the address of the thread-specific
    errno */
    extern volatile int*   __errno(void);

    /* a macro expanding to the errno l-value */
    #define  errno   (*__errno())

It seems okay.

How do you reproduce this problem?  What are the stunnel debug logs when 
it happens?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20140110/52605800/attachment.html>

More information about the stunnel-users mailing list