tgt: remove bzero usage 13111/head
authorRosen Penev <rosenp@gmail.com>
Fri, 14 Aug 2020 03:16:06 +0000 (20:16 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 14 Aug 2020 04:34:22 +0000 (21:34 -0700)
bzero is deprecated and replaced by memset.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/tgt/Makefile
net/tgt/patches/110-bzero.patch [new file with mode: 0644]

index d7a8d5ee05de6560155799db551b8d6c365d2b55..6eb8230a58321d18f7706d0d1ac25664c411d70a 100644 (file)
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tgt
 PKG_VERSION:=1.0.79
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/fujita/tgt/tar.gz/v$(PKG_VERSION)?
diff --git a/net/tgt/patches/110-bzero.patch b/net/tgt/patches/110-bzero.patch
new file mode 100644 (file)
index 0000000..2ff11b1
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/usr/iscsi/target.c
++++ b/usr/iscsi/target.c
+@@ -224,7 +224,7 @@ get_redirect_address(char *callback, char *buffer, int buflen,
+ {
+       char *p, *addr, *port;
+-      bzero(buffer, buflen);
++      memset(buffer, 0, buflen);
+       if (call_program(callback, NULL, NULL, buffer, buflen, 0))
+               return -1;