|
From ced49c99ef0b120d32bcbb3bb6985ff90833052e Mon Sep 17 00:00:00 2001
|
|
From: Rosen Penev <rosenp@gmail.com>
|
|
Date: Tue, 30 Apr 2019 22:34:45 -0700
|
|
Subject: [PATCH 1/2] iscsi_tcp: Replace deprecated valloc function
|
|
|
|
Replaced with posix_memalign as valloc is not available on uClibc.
|
|
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
---
|
|
usr/iscsi/iscsi_tcp.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/usr/iscsi/iscsi_tcp.c b/usr/iscsi/iscsi_tcp.c
|
|
index 536f22e..5762c23 100644
|
|
--- a/usr/iscsi/iscsi_tcp.c
|
|
+++ b/usr/iscsi/iscsi_tcp.c
|
|
@@ -578,7 +578,10 @@ static void iscsi_tcp_free_task(struct iscsi_task *task)
|
|
|
|
static void *iscsi_tcp_alloc_data_buf(struct iscsi_connection *conn, size_t sz)
|
|
{
|
|
- return valloc(sz);
|
|
+ void *addr = NULL;
|
|
+
|
|
+ posix_memalign(&addr, sysconf(_SC_PAGESIZE), sz);
|
|
+ return addr;
|
|
}
|
|
|
|
static void iscsi_tcp_free_data_buf(struct iscsi_connection *conn, void *buf)
|
|
--
|
|
2.21.0
|
|
|