Przeglądaj źródła

libnfs: add buildroot patch to fix a compile issue

Waldemar Brodkorb 2 dni temu
rodzic
commit
afec0cedf3
1 zmienionych plików z 31 dodań i 0 usunięć
  1. 31 0
      package/libnfs/patches/patch-lib_socket_c

+ 31 - 0
package/libnfs/patches/patch-lib_socket_c

@@ -0,0 +1,31 @@
+--- libnfs-libnfs-6.0.2.orig/lib/socket.c	2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/lib/socket.c	2026-07-09 23:14:51.875631318 +0200
+@@ -583,8 +583,8 @@ rpc_read_from_socket(struct rpc_context
+ 		}
+ 		if (!rpc->is_server_context) {
+ 			rpc->rm_xid[0] = count;
+-			rpc->rm_xid[1] = ntohl(*(uint32_t *)&buf[0]);
+-			rpc->pdu = rpc_find_pdu(rpc, ntohl(*(uint32_t *)&buf[0]));
++			rpc->rm_xid[1] = ntohl(*(uint32_t *)(void *)&buf[0]);
++			rpc->pdu = rpc_find_pdu(rpc, ntohl(*(uint32_t *)(void *)&buf[0]));
+ 			if (rpc->pdu == NULL) {
+ 				rpc_set_error(rpc, "Failed to match incoming PDU/XID."
+ 						" Ignoring PDU");
+@@ -796,7 +796,7 @@ rpc_read_from_socket(struct rpc_context
+                                 }
+ 
+                                 /* Copy the next 4 bytes into inbuf */
+-                                *((uint32_t *)rpc->inbuf) = htonl(rpc->rm_xid[1]);
++                                *((uint32_t *)(void *)rpc->inbuf) = htonl(rpc->rm_xid[1]);
+ 
+                                 /* but set inpos to 0, we will update it above
+                                  * that we have already read these 4 bytes in
+@@ -858,7 +858,7 @@ rpc_read_from_socket(struct rpc_context
+                                                  * If the READ failed, bail out here as there is no
+                                                  * data.
+                                                  */
+-                                                const READ3res *res = (READ3res *) rpc->pdu->zdr_decode_buf;
++                                                const READ3res *res = (READ3res *)(void *) rpc->pdu->zdr_decode_buf;
+                                                 if (res->status != NFS3_OK) {
+                                                         goto payload_finished;
+                                                 }