From afc1d8cfc584e0f1f4a77e8c0ce3e979d9fe7ce2 Mon Sep 17 00:00:00 2001 From: Hanks Date: Tue, 12 Jan 2021 21:27:15 +0800 Subject: [PATCH] Fix build error of IPPROTO_TCP on android I got the following error when build this lib by source on android: ``` easywsclient.cpp:522:24: error: use of undeclared identifier 'IPPROTO_TCP' setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof(flag)); // Disable Nagle's algorithm ^ 1 error generated. ``` Add a header `#include ` fixed it. --- easywsclient.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/easywsclient.cpp b/easywsclient.cpp index 0770870..0c98098 100644 --- a/easywsclient.cpp +++ b/easywsclient.cpp @@ -43,6 +43,7 @@ #else #include #include + #include #include #include #include