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 <netinet/in.h>` fixed it.
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user