Skip to content

Commit

Permalink
Fix running IPv6 reassembly unit tests on 64-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
goldsimon committed Oct 10, 2023
1 parent c8f4202 commit 66ef250
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion test/unit/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_RAND_SRC_PORT)

/* Minimal changes to opt.h required for tcp unit tests: */
#define MEM_SIZE 16000
#define MEM_SIZE 17000
#define TCP_SND_QUEUELEN 40
#define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
#define TCP_SND_BUF (12 * TCP_MSS)
Expand Down Expand Up @@ -91,4 +91,27 @@
/* Check lwip_stats.mem.illegal instead of asserting */
#define LWIP_MEM_ILLEGAL_FREE(msg) /* to nothing */

/* autodetect if we are running the tests on 32-bit or 64-bit */
#if defined(_WIN32) || defined(_WIN64)
#if defined(_WIN64)
#define PTR64
#else
#define PTR32
#endif
#elif defined(__GNUC__)
#if defined(__x86_64__) || defined(__ppc64__)
#define PTR64
#else
#define PTR32
#endif
#elif UINTPTR_MAX > UINT_MAX
#define PTR64
#else
#define PTR32
#endif

#ifdef PTR64
#define IPV6_FRAG_COPYHEADER 1
#endif

#endif /* LWIP_HDR_LWIPOPTS_H */

0 comments on commit 66ef250

Please sign in to comment.