aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libnetmap/libnetmap.h4
-rw-r--r--lib/libnetmap/nmport.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libnetmap/libnetmap.h b/lib/libnetmap/libnetmap.h
index 6736ee9cc46b..0367a1735c4f 100644
--- a/lib/libnetmap/libnetmap.h
+++ b/lib/libnetmap/libnetmap.h
@@ -554,9 +554,9 @@ struct nmreq_option *nmreq_find_option(struct nmreq_header *, uint32_t);
void nmreq_free_options(struct nmreq_header *);
const char* nmreq_option_name(uint32_t);
#define nmreq_foreach_option(h_, o_) \
- for ((o_) = (struct nmreq_option *)((h_)->nr_options);\
+ for ((o_) = (struct nmreq_option *)((uintptr_t)((h_)->nr_options));\
(o_) != NULL;\
- (o_) = (struct nmreq_option *)((o_)->nro_next))
+ (o_) = (struct nmreq_option *)((uintptr_t)((o_)->nro_next)))
/* nmctx manipulation */
diff --git a/lib/libnetmap/nmport.c b/lib/libnetmap/nmport.c
index ec39172a0b1e..a3fd7e87100f 100644
--- a/lib/libnetmap/nmport.c
+++ b/lib/libnetmap/nmport.c
@@ -614,7 +614,7 @@ nmport_mmap(struct nmport_d *d)
}
memset(m, 0, sizeof(*m));
if (d->extmem != NULL) {
- m->mem = (void *)d->extmem->nro_usrptr;
+ m->mem = (void *)((uintptr_t)d->extmem->nro_usrptr);
m->size = d->extmem->nro_info.nr_memsize;
m->is_extmem = 1;
} else {