]> git.pld-linux.org Git - packages/php.git/commitdiff
add lfs bcond for making large inodes not failing stat:
authorElan Ruusamäe <glen@delfi.ee>
Sat, 17 May 2014 22:52:28 +0000 (01:52 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 6 Nov 2015 11:20:53 +0000 (13:20 +0200)
$ php -r 'var_dump(stat("issue_72810095"));'
PHP Warning:  stat(): stat failed for issue_72810095 in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
PHP   2. stat() Command line code:1
bool(false)

$ stat issue_72810095
  File: `issue_72810095'
  Size: 4096            Blocks: 8          IO Block: 32768  directory
Device: 17h/23d Inode: 5629499534939156  Links: 2
Access: (0777/drwxrwxrwx)  Uid: (   51/    http)   Gid: (   51/    http)
Access: 2015-11-06 11:41:47.266401400 +0200
Modify: 2015-11-06 11:41:47.266401400 +0200
Change: 2015-11-06 11:41:47.266401400 +0200
 Birth: -

git cherry-pick a0106ed918ffc6ff961caa33a8e27003bcfc3133

build with -D_FILE_OFFSET_BITS=64 to make php not fail on inode64 mounts

http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2014-May/023916.html

php.spec

index 3730edf45c289b614ab582bea9801a40a42b54fd..06c8819a6a2f0eb756efb93b76211180b1ab5e7b 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -63,6 +63,7 @@
 %bcond_without apache1         # disable building Apache 1.3.x SAPI
 %bcond_without apache2         # disable building Apache 2.x SAPI
 %bcond_with    zts             # Zend Thread Safety
+%bcond_with    lfs             # Build with FILE_OFFSET_BITS=64
 %bcond_without cgi             # disable CGI/FCGI SAPI
 %bcond_without fpm             # disable FPM
 %bcond_without embed           # disable Embedded API
 %undefine      with_litespeed
 %endif
 
+%ifnarch %{ix86} x32
+# has no effect on 64bit systems
+%undefine      with_lfs
+%endif
+
 # mm is not thread safe
 %if %{with zts}
 %undefine      with_mm
@@ -2243,8 +2249,10 @@ if [ ! -f _built-conf ]; then
        touch _built-conf
 fi
 export PROG_SENDMAIL="/usr/lib/sendmail"
-export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} \
-       -I%{_includedir}/xmlrpc-epi"
+export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} -I%{_includedir}/xmlrpc-epi"
+%if %{with lfs}
+CPPFLAGS="$CPPFLAGS $(getconf LFS_CFLAGS)"
+%endif
 
 sapis="
 cli
This page took 0.322522 seconds and 4 git commands to generate.