You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
930 B

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