SHA256
1
0
forked from pool/vifm

Accepting request 327595 from home:michel_mno:branches:utilities

- new patch to avoid build failure for PowerPC architectures
  vifm_utils_nix_dynamic_page_size_for_powerpc.patch

OBS-URL: https://build.opensuse.org/request/show/327595
OBS-URL: https://build.opensuse.org/package/show/utilities/vifm?expand=0&rev=18
This commit is contained in:
Michael Vetter 2015-08-28 10:12:48 +00:00 committed by Git OBS Bridge
parent 614c59e5b9
commit c12371eaa1
3 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 27 16:08:17 UTC 2015 - normand@linux.vnet.ibm.com
- new patch to avoid build failure for PowerPC architectures
vifm_utils_nix_dynamic_page_size_for_powerpc.patch
-------------------------------------------------------------------
Fri Jul 10 08:46:10 UTC 2015 - mvetter@suse.com

View File

@ -37,6 +37,7 @@ BuildRequires: pkgconfig(x11)
%else
BuildRequires: xorg-x11-devel
%endif
Patch1: vifm_utils_nix_dynamic_page_size_for_powerpc.patch
%description
Vifm is a ncurses based file manager with vi like keybindings that allow complete
@ -46,6 +47,7 @@ and configurable color schemes.
%prep
%setup -q
%patch1 -p1
%build
%configure \

View File

@ -0,0 +1,26 @@
From: Michel Normand <normand@linux.vnet.ibm.com>
Subject: vifm utils nix dynamic page size for powerpc
Date: Thu, 27 Aug 2015 17:57:44 +0200
utils-nix.c needs dynamic PAGE_SIZE for powerpc
as not defined by default.
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
---
src/utils/utils_nix.c | 3 +++
1 file changed, 3 insertions(+)
Index: vifm-0.8/src/utils/utils_nix.c
===================================================================
--- vifm-0.8.orig/src/utils/utils_nix.c
+++ vifm-0.8/src/utils/utils_nix.c
@@ -261,6 +261,9 @@ char **
make_execv_array(char shell[], char cmd[])
{
#ifdef MAX_ARG_STRLEN
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
+#endif
/* Don't use maximum length, leave some room or commands fail to run. */
const size_t safe_arg_len = MIN(MAX_ARG_STRLEN, MAX_ARG_STRLEN - 4096U);
const size_t npieces = DIV_ROUND_UP(strlen(cmd), safe_arg_len);