Accepting request 629014 from home:lee_duncan:branches:Base:System

- 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

OBS-URL: https://build.opensuse.org/request/show/629014
OBS-URL: https://build.opensuse.org/package/show/Base:System/tgt?expand=0&rev=41
This commit is contained in:
Lee Duncan 2018-08-13 15:48:07 +00:00 committed by Git OBS Bridge
parent 75b190d1d8
commit 4a9d703312
4 changed files with 37 additions and 2 deletions

View File

@ -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;

View File

@ -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 <sys/stat.h>
#include <sys/epoll.h>
#include <scsi/sg.h>
+#include <sys/sysmacros.h>
#include "bsg.h" /* Copied from include/linux/bsg.h */
#include "list.h"

View File

@ -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

View File

@ -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