Add volatile to make MIP work with Diab 4.3 on PPC

This commit is contained in:
cpq authored and Sergio R. Caprile committed 2026-03-12 13:45:15 -03:00
1 parent f0d1800c6b
commit d27e7b3e7e
2 files changed
+12

No files matched your search

+6
View File
@@ -262,6 +262,9 @@ static bool icmpcsum_ok(const void *d, size_t len) {
static uint16_t pcsum(void *d, void *p, size_t plen) {
uint32_t sum;
struct ip *ip = (struct ip *) d;
#if defined(__DCC__)
volatile /* Makes PPC & Diab4.3 happy */
#endif
struct pseudoip pip;
pip.src = ip->src;
pip.dst = ip->dst;
@@ -290,6 +293,9 @@ static bool tcpcsum_ok(void *d, void *t) {
static uint16_t p6csum(void *d, void *p, size_t plen) {
uint32_t sum;
struct ip6 *ip6 = (struct ip6 *) d;
#if defined(__DCC__)
volatile /* Makes PPC & Diab4.3 happy */
#endif
struct pseudoip6 pip6;
pip6.src[0] = ip6->src[0], pip6.src[1] = ip6->src[1];
pip6.dst[0] = ip6->dst[0], pip6.dst[1] = ip6->dst[1];