<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/09/2014 06:02 PM, FX35 wrote:<br>
</div>
<blockquote cite="mid:52CED625.7050409@free.fr" type="cite"> Running
stunnel 4.56 or 5.00 on an ARM platform (ARM926EJ) with Linux
2.6.36.4, I encounter the following error : the call to connect()
return -1, but errno is set to 0 !
<br>
<br>
If stunnel is configured to use fork mode instead of pthread
mode, the problem disapear.
<br>
<br>
So it seems there is a problem, cross-compiling the program, with
errno or __errno_location() in the program generated with pthread.
<br>
<br>
I add the definition of _REENTRANT, without success ...
<br>
<br>
(See $H1 at
<a class="moz-txt-link-freetext" href="http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html">http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html</a>)
<br>
<br>
Is somebody meet the same error ?<br>
</blockquote>
<br>
The errno definition in the Android framework (as an example of
Linux/ARM platform) is:<br>
<br>
<blockquote>/* internal function returning the address of the
thread-specific errno */<br>
extern volatile int* __errno(void);<br>
<br>
/* a macro expanding to the errno l-value */<br>
#define errno (*__errno())<br>
</blockquote>
<br>
It seems okay.<br>
<br>
How do you reproduce this problem? What are the stunnel debug logs
when it happens?<br>
<br>
Mike<br>
</body>
</html>