Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use microhttpd MHD_Result return type. fix: error: invalid conversion from int to MHD_Result #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milahu
Copy link

@milahu milahu commented Nov 26, 2023

based on
cinemast/libjson-rpc-cpp#299

fix this build error

http_server.cc: In function 'MHD_Daemon* startupHttpDaemon(int)':
http_server.cc:722:31: error: invalid conversion from 'int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)' {aka 'int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)'} to 'MHD_AccessHandlerCallback' {aka 'MHD_Result (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)'} [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-fpermissive-fpermissive8;;]
  722 |                         NULL, &answerToConnection, NULL, MHD_OPTION_CONNECTION_TIMEOUT, 5, MHD_OPTION_END);
      |                               ^~~~~~~~~~~~~~~~~~~
      |                               |
      |                               int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**) {aka int (*)(void*, MHD_Connection*, const char*, const char*, const char*, const char*, long unsigned int*, void**)}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant