libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Problems with libmicrohttpd.a on a gnu_linux-armeabihf p


From: Bob Furber
Subject: [libmicrohttpd] Problems with libmicrohttpd.a on a gnu_linux-armeabihf platform
Date: Mon, 16 Feb 2015 15:32:40 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

I have a program using mictohttpd that works very well on a 64 bit Linux PC, but I am having a devil of a time with mictohttpd in my attempt to port this program to a gnu-linux-eabihf platform. I get the same error when calling MHD_create_response_from_callback(), whether I use a precompiled gnu-linux-eabihf libmicrohttpd.a or, whether I build it myself on the Arm platform:

error: invalid conversion from ‘long int (*)(void*, uint64_t, char*, size_t) {aka long int (*)(void*, long long unsigned int, char*, unsigned int)}’ to ‘MHD_ContentReaderCallback {aka int (*)(void*, long long unsigned int, char*, unsigned int)}’ [-fpermissive]

It would appear there is a problem on the armhf with the MHD_ContentReaderCallback function passed as a parameter to MHD_create_response_from_callback() returning a long int instead of a type ssize_t as per its prototype. It appears that in the LinuxPC version, ssize_t was equivalent to a long int, whereas, on the armhf version, it is equivalent to an int.

However, changing the MHD_ContentReaderCallback function to return an int or a ssize_t results in a ton of “undefined reference to `MHD_xxx'” errors.

I should also mention that the MHD_create_response_from_callback() declaration in microhttpd.h displays this obscure error:

initializing argument 3 of ‘MHD_Response* MHD_create_response_from_callback(uint64_t, size_t, MHD_ContentReaderCallback, void*, MHD_ContentReaderFreeCallback)’ [-fpermissive]

At my wits' end...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]