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:
Hanks
2021-01-12 21:27:15 +08:00
committed by David Baird
parent 4b8bead6a1
commit afc1d8cfc5
+1
View File
@@ -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>