Compare commits

...

5 Commits

Author SHA1 Message Date
James Peach
a6d5c89501
Merge ed9dabe088 into 86c9f79991 2024-05-15 15:50:05 +08:00
jeans
86c9f79991 refactor: added apple macro for fs handling 2024-05-14 13:53:42 +02:00
jeans
8e1a247c1f refactor: added macOS include file
MacOS supports util.h as well
2024-05-14 13:53:42 +02:00
James Peach
ed9dabe088 contrib/ports: Add explanation to using static ip
This took some figuring out, it might be obvious to those familiar with
lwipcfg.h but for someone picking this up for the first time to experiment on
linux, this helpful comment would have helped enormously.
2024-03-24 11:52:34 +00:00
James Peach
d5fc0cc825 src/api: mark arguments as unused 2024-03-24 11:51:23 +00:00
4 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include <stdio.h>
#if defined(LWIP_UNIX_OPENBSD)
#if defined(LWIP_UNIX_OPENBSD) || defined(LWIP_UNIX_MACH)
#include <util.h>
#endif
#include <termios.h>

View File

@ -12,6 +12,9 @@
# Enter 192.168.1.200 or "http://lwip.local/" (Zeroconf)
# in your webbrowser to see example_app webpage.
# N.b. you must disable USE_DHCP and USE_AUTOIP in lwipcfg.h for the static
# ip 192.168.1.200 to work in tapif
export PRECONFIGURED_TAPIF=tap0
sudo ip tuntap add dev $PRECONFIGURED_TAPIF mode tap user `whoami`

View File

@ -2926,6 +2926,7 @@ lwip_sockopt_to_ipopt(int optname)
static void
lwip_getsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, void* optval)
{
LWIP_UNUSED_ARG(s);
if (sock->conn->pcb.raw->chksum_reqd == 0) {
*(int*)optval = -1;
}
@ -2939,6 +2940,7 @@ lwip_getsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, void* optval)
static int
lwip_setsockopt_impl_ipv6_checksum(int s, struct lwip_sock* sock, const void* optval, socklen_t optlen)
{
LWIP_UNUSED_ARG(s);
/* It should not be possible to disable the checksum generation with ICMPv6
* as per RFC 3542 chapter 3.1 */
if (sock->conn->pcb.raw->protocol == IPPROTO_ICMPV6) {

View File

@ -77,7 +77,7 @@ static int deflate_level; /* default compression level, can be changed via comma
#define CHDIR(path) SetCurrentDirectoryA(path)
#define CHDIR_SUCCEEDED(ret) (ret == TRUE)
#elif __linux__
#elif __linux__ || __APPLE__
#define GETCWD(path, len) getcwd(path, len)
#define GETCWD_SUCCEEDED(ret) (ret != NULL)