diff --git a/tgt-compare-pointer-to-null.patch b/tgt-compare-pointer-to-null.patch new file mode 100644 index 0000000..bcd5d79 --- /dev/null +++ b/tgt-compare-pointer-to-null.patch @@ -0,0 +1,12 @@ +diff -aurp tgt-1.0.60.orig/usr/tgtd.c tgt-1.0.60/usr/tgtd.c +--- tgt-1.0.60.orig/usr/tgtd.c 2015-07-01 17:10:39.000000000 -0700 ++++ tgt-1.0.60/usr/tgtd.c 2018-08-11 18:08:50.707873331 -0700 +@@ -310,7 +310,7 @@ int call_program(const char *cmd, void ( + pos = arg; + str_spacecpy(&pos, cmd); + if (strchr(cmd, ' ')) { +- while (pos != '\0') ++ while (pos != NULL) + argv[i++] = strsep(&pos, " "); + } else + argv[i++] = arg; diff --git a/tgt-include-sys-macros-for-major.patch b/tgt-include-sys-macros-for-major.patch new file mode 100644 index 0000000..cb14477 --- /dev/null +++ b/tgt-include-sys-macros-for-major.patch @@ -0,0 +1,11 @@ +diff -aurp tgt-1.0.60.orig/usr/bs_sg.c tgt-1.0.60/usr/bs_sg.c +--- tgt-1.0.60.orig/usr/bs_sg.c 2015-07-01 17:10:39.000000000 -0700 ++++ tgt-1.0.60/usr/bs_sg.c 2018-08-11 18:03:25.489712435 -0700 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "bsg.h" /* Copied from include/linux/bsg.h */ + #include "list.h" diff --git a/tgt.changes b/tgt.changes index 1b9d530..8738464 100644 --- a/tgt.changes +++ b/tgt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Aug 12 01:11:13 UTC 2018 - lduncan@suse.com + +- Fixing build issue with "major()" and a pointer + comparison warning while I was at it, adding patches: + * tgt-include-sys-macros-for-major.patch + * tgt-compare-pointer-to-null.patch + ------------------------------------------------------------------- Thu Nov 23 13:42:22 UTC 2017 - rbrown@suse.com diff --git a/tgt.spec b/tgt.spec index 613267e..4a6a980 100644 --- a/tgt.spec +++ b/tgt.spec @@ -1,7 +1,7 @@ # # spec file for package tgt # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,7 @@ Name: tgt Version: 1.0.60 Release: 0 Summary: Generic Linux target framework (tgt) -License: GPL-2.0 +License: GPL-2.0-only Group: System/Daemons Url: http://stgt.sourceforge.net/ Source: https://github.com/fujita/tgt/archive/v%{version}.tar.gz @@ -36,6 +36,8 @@ Patch2: %{name}-fix-build Patch3: setup-tgt-conf-d.patch Patch4: %{name}-handle-access-of-a-target-that-has-been-removed Patch5: %{name}-missing-module-directory-not-an-error +Patch6: %{name}-include-sys-macros-for-major.patch +Patch7: %{name}-compare-pointer-to-null.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: libaio-devel BuildRequires: libxslt @@ -60,6 +62,8 @@ user-space daemon and tools (i.e. they completely runs in user space). %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build %ifarch ppc ppc64 ppc64le