examples/netmap: fix build for x32 ABI
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 18 May 2015 08:17:59 +0000 (10:17 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 19 May 2015 15:35:33 +0000 (17:35 +0200)
Fix a cast issue:
examples/netmap_compat/lib/compat_netmap.c:827:10: error: cast to
  pointer from integer of different size [-Werror=int-to-pointer-cast]

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
examples/netmap_compat/lib/compat_netmap.c

index 1d86ef0..856ab6e 100644 (file)
@@ -824,7 +824,7 @@ rte_netmap_mmap(void *addr, size_t length,
                return (MAP_FAILED);
        }
 
-       return ((void *)((uintptr_t)netmap.mem + offset));
+       return (void *)((uintptr_t)netmap.mem + (uintptr_t)offset);
 }
 
 /**