Skip to content

Commit

Permalink
net/libiscsi: fix build on i386
Browse files Browse the repository at this point in the history
While here refresh patches with "make makepatch".

PR:	280800
MFH:	2024Q3
  • Loading branch information
Martin Birgmeier authored and VVD committed Aug 13, 2024
1 parent 541c8bb commit 2056579
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions net/libiscsi/files/patch-configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- ./configure.ac.ORIG 2023-02-11 20:12:38.532565000 +0100
+++ ./configure.ac 2023-02-11 20:14:27.194137000 +0100
@@ -170,7 +170,8 @@
--- configure.ac.orig 2024-02-05 23:51:38 UTC
+++ configure.ac
@@ -170,7 +170,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <infiniband/verbs.h>
#include <rdma/rdma_cma.h>
Expand Down
15 changes: 12 additions & 3 deletions net/libiscsi/files/patch-lib_socket.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- ./lib/socket.c.ORIG 2023-02-11 20:12:27.340472000 +0100
+++ ./lib/socket.c 2023-02-11 21:13:25.802721000 +0100
@@ -140,7 +140,7 @@
--- lib/socket.c.orig 2024-02-05 23:51:38 UTC
+++ lib/socket.c
@@ -140,7 +140,7 @@ iscsi_add_to_outqueue(struct iscsi_context *iscsi, str
pdu->next = NULL;
}

Expand All @@ -9,3 +9,12 @@
iface_rr--;
}

@@ -531,7 +531,7 @@ iscsi_iovector_readv_writev(struct iscsi_context *iscs

if (pos < iovector->offset) {
iscsi_set_error(iscsi, "%s: iovector reset. pos(%d) is smaller than"
- "current offset(%ld)", rw, pos, iovector->offset);
+ "current offset(%zd)", rw, pos, iovector->offset);
errno = EINVAL;
return -1;
}
14 changes: 14 additions & 0 deletions net/libiscsi/files/patch-utils_iscsi-discard.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- utils/iscsi-discard.c.orig 2024-02-05 23:51:38 UTC
+++ utils/iscsi-discard.c
@@ -220,7 +220,11 @@ int main(int argc, char *argv[])

capacity = block_length * (rc16->returned_lba + 1);
if (offset > capacity) {
+#ifdef __i386__
+ fprintf(stderr,"Offset(%llu) exceeds capacity(%llu)\n", offset, capacity);
+#else
fprintf(stderr,"Offset(%lu) exceeds capacity(%lu)\n", offset, capacity);
+#endif
goto free_task;
}

0 comments on commit 2056579

Please sign in to comment.