mirror of
https://repo.or.cz/socat.git
synced 2025-07-14 15:23:24 +00:00
For NuttX OS: Made struct ip subject to configure
This commit is contained in:
parent
35590e3cdb
commit
de80846643
4 changed files with 26 additions and 0 deletions
|
@ -221,9 +221,12 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
}
|
||||
|
||||
switch(from.soa.sa_family) {
|
||||
#if HAVE_STRUCT_IP
|
||||
int headlen;
|
||||
#endif /* HAVE_STRUCT_IP */
|
||||
#if WITH_IP4
|
||||
case AF_INET:
|
||||
#if HAVE_STRUCT_IP
|
||||
if (pipe->dtype & XIOREAD_RECV_SKIPIP) {
|
||||
/* IP4 raw sockets include the header when passing a packet to the
|
||||
application - we don't need it here. */
|
||||
|
@ -240,6 +243,7 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
bytes -= headlen;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_STRUCT_IP */
|
||||
break;
|
||||
#endif
|
||||
#if WITH_IP6
|
||||
|
@ -357,9 +361,12 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
}
|
||||
|
||||
switch(from.soa.sa_family) {
|
||||
#if HAVE_STRUCT_IP
|
||||
int headlen;
|
||||
#endif /* HAVE_STRUCT_IP */
|
||||
#if WITH_IP4
|
||||
case AF_INET:
|
||||
#if HAVE_STRUCT_IP
|
||||
if (pipe->dtype & XIOREAD_RECV_SKIPIP) {
|
||||
/* IP4 raw sockets include the header when passing a packet to the
|
||||
application - we don't need it here. */
|
||||
|
@ -376,6 +383,7 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
bytes -= headlen;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_STRUCT_IP */
|
||||
break;
|
||||
#endif
|
||||
#if WITH_IP6
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue