[ 
https://issues.apache.org/jira/browse/THRIFT-3370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182876#comment-15182876
 ] 

ASF GitHub Bot commented on THRIFT-3370:
----------------------------------------

GitHub user gadLinux opened a pull request:

    https://github.com/apache/thrift/pull/929

    Fix problem on #THRIFT-3370

    This is a rebased master of the thrift-3370.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gadLinux/thrift thrift-3370

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/929.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #929
    
----
commit 0a85d968a4407fe5f3ab4bb63420dbd5574490e9
Author: Gonzalo Aguilar Delgado <gagui...@level2crm.com>
Date:   2015-10-09T02:14:59Z

    Fix problem on #THRIFT-3370

----


> errno extern variable redefined. Not compiling for Android
> ----------------------------------------------------------
>
>                 Key: THRIFT-3370
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3370
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Library
>    Affects Versions: 0.9.3
>            Reporter: Gonzalo Aguilar
>            Assignee: Gonzalo Aguilar
>              Labels: build, c, easyfix
>             Fix For: 0.10.0
>
>
> It seems that the definition of errno we are using on the c_glib transport is 
> not 100% correct. While it's ok for ISO C99 compilers it fails under Android. 
> My opinion is that Android is behaving incorrectly here but I cannot be sure 
> until I check with you. 
> In the thrift_socket.c an thrift_server_socket.c implementations there's a 
> errno variable declared.
> /* for errors coming from socket() and connect() */
> extern int errno;
> This variable is redefined in the ndk of the in the file 
> arch-arm/usr/include/errno.h 
> I don't know why. 
> /* a macro expanding to the errno l-value */
> #define  errno   (*__errno())
> So the compilation fails because redefined. 
> Commenting out the extern definition on these files it compiles, it was 
> tested and it works. But I don't know how this can work since the definition 
> of errno on the files change from int to pointer. 
> Can someone comment this please?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to