From 3dd3d87b39555c44993207006f7417cf7f399aae Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 16 Jul 2015 08:57:15 -0400 Subject: [PATCH] fish: Fix build on i686 --- packages/fish/configure.patch | 14 +++++++++++--- packages/fish/wutil.cpp.patch | 12 ++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 packages/fish/wutil.cpp.patch diff --git a/packages/fish/configure.patch b/packages/fish/configure.patch index 526db9e1..7c04426d 100644 --- a/packages/fish/configure.patch +++ b/packages/fish/configure.patch @@ -1,6 +1,6 @@ diff -u -r ../fish-2.2.0/configure.ac ./configure.ac --- ../fish-2.2.0/configure.ac 2015-07-03 15:46:59.000000000 -0400 -+++ ./configure.ac 2015-07-13 02:10:09.284896892 -0400 ++++ ./configure.ac 2015-07-16 08:54:32.825023137 -0400 @@ -249,6 +249,7 @@ ) ], @@ -33,7 +33,15 @@ diff -u -r ../fish-2.2.0/configure.ac ./configure.ac AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] ) AC_SEARCH_LIBS( setupterm, [ncurses tinfo curses], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])] ) AC_SEARCH_LIBS( [nan], [m], [AC_DEFINE( [HAVE_NAN], [1], [Define to 1 if you have the nan function])] ) -@@ -559,7 +550,8 @@ +@@ -503,6 +494,7 @@ + # + # Detect nanoseconds fields in struct stat + # ++AC_CHECK_MEMBERS([struct stat.st_ctime_nsec]) + AC_CHECK_MEMBERS([struct stat.st_mtimespec.tv_nsec]) + AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec]) + +@@ -559,7 +551,8 @@ ) ], [have_realpath_null=yes], @@ -43,7 +51,7 @@ diff -u -r ../fish-2.2.0/configure.ac ./configure.ac ) if test "$have_realpath_null" = yes; then -@@ -636,6 +628,9 @@ +@@ -636,6 +629,9 @@ [ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1], [Define to 1 one if the implemented fwprintf is broken]) diff --git a/packages/fish/wutil.cpp.patch b/packages/fish/wutil.cpp.patch new file mode 100644 index 00000000..e3ab763a --- /dev/null +++ b/packages/fish/wutil.cpp.patch @@ -0,0 +1,12 @@ +diff -u -r ../fish-2.2.0/wutil.cpp ./wutil.cpp +--- ../fish-2.2.0/wutil.cpp 2015-07-03 15:46:59.000000000 -0400 ++++ ./wutil.cpp 2015-07-16 08:55:37.131915467 -0400 +@@ -531,7 +531,7 @@ + result.size = buf->st_size; + result.change_seconds = buf->st_ctime; + +-#if STAT_HAVE_NSEC ++#ifdef HAVE_STRUCT_STAT_ST_CTIME_NSEC + result.change_nanoseconds = buf->st_ctime_nsec; + #elif defined(__APPLE__) + result.change_nanoseconds = buf->st_ctimespec.tv_nsec; -- 2.11.0