Skip to content

Fix prototype mismatch in private-network.h - #3027

Closed
Dolphindalt wants to merge 1 commit into
warmcat:mainfrom
Dolphindalt:patch-1
Closed

Fix prototype mismatch in private-network.h#3027
Dolphindalt wants to merge 1 commit into
warmcat:mainfrom
Dolphindalt:patch-1

Conversation

@Dolphindalt

Copy link
Copy Markdown

The implementation of lws_tls_server_abort_connection is defined as below.

#if defined(LWS_AMAZON_RTOS)
enum lws_ssl_capable_status
#else
int
#endif
lws_tls_server_abort_connection(struct lws *wsi)
{
...
}

But in the header file, it is defined as the following.

enum lws_ssl_capable_status
lws_tls_server_abort_connection(struct lws *wsi);

Compiling with a aarch64-none-linux-gnu compiler, the following error is produced.

image

This error does not appear when compiling with arm-linux-gnueabihf compiler.

The proposed change simply updates the prototype in the header to match the body. This resolves the compilation issue.

@lws-team

Copy link
Copy Markdown
Member

This was a bit confusing... main does not look like how you described. In fact I solved this in 2020 the other way, by just using the enum for everything.

5c7b5af92 (Andy Green      2020-09-06 11:46:25 +0100 170) enum lws_ssl_capable_status
84a57540a (Andy Green      2019-01-13 06:58:21 +0800 171) lws_tls_server_abort_connection(struct lws *wsi);

It happened long enough ago, that on main branch, which is what the PR is trying to patch, and on v4.3-stable, there's no need for this patch. And anything else is too old to worry about. So you should probably upgrade to at least v4.3-stable.

@Dolphindalt

Copy link
Copy Markdown
Author

I see. Thank you for the response.

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.

2 participants