Closed habu1010 closed 1 year ago
Hey! Thanks for the report. Yes, it seems like you're right. We appear to be missing <sys/time.h>
as an explicit include.
The proper place to add it would be in include/sockpp/platform.h
in the #else
(non-Windows) section, around line 102 or so:
#if defined(_WIN32)
// ...
#else
#include <unistd.h>
#include <sys/socket.h>
#include <sys/time.h> // <-- add
#include <sys/uio.h>
#include <arpa/inet.h>
// ...
#endif
Let me know if that work to fix it for you, and if so, I will add it in for the next release.
Thanks for your reply!
I have verified that adding the inclusion of the sys/time.h header at your specified location compiles without problems. Hopefully this fix will be added to the next release.
Regards.
In new Release v0.8.1
When I try to cross-compile for use on an SH4 Linux system, I get a compile error.
After configuring with cmake as follows :
The following error message appears when performing a build.
According to the error, the definition of the timeval type seems to be missing, so adding the following sys/time.h include near the beginning of include/sockpp/socket.h will enable compilation.
This should solve the problem on Linux-based systems, but I am not sure if this is a reasonable solution on non-Linux systems.