summaryrefslogtreecommitdiff
path: root/tools/virtio/ringtest/ptr_ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virtio/ringtest/ptr_ring.c')
-rw-r--r--tools/virtio/ringtest/ptr_ring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
index 74abd746ae91..68e4f9f0da3a 100644
--- a/tools/virtio/ringtest/ptr_ring.c
+++ b/tools/virtio/ringtest/ptr_ring.c
@@ -17,6 +17,11 @@
typedef pthread_spinlock_t spinlock_t;
typedef int gfp_t;
+static void *kmalloc(unsigned size, gfp_t gfp)
+{
+ return memalign(64, size);
+}
+
static void *kzalloc(unsigned size, gfp_t gfp)
{
void *p = memalign(64, size);