[Python-modules-commits] [python-llfuse] 08/16: Work around bug in mips+mipsel libc
Nikolaus Rath
nikratio-guest at moszumanska.debian.org
Tue Mar 8 17:38:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
nikratio-guest pushed a commit to branch master
in repository python-llfuse.
commit c68743b34c6f1fda410725f52c5e1f2a19b83835
Author: Nikolaus Rath <Nikolaus at rath.org>
Date: Mon Feb 1 09:40:04 2016 -0800
Work around bug in mips+mipsel libc
Forwarded: no
Patch-Name: mips_dev_t.diff
On mips and mipsel, the st_dev and st_rdev members of struct stat do not
have type dev_t. This breaks POSIX compatibility, but is difficult to fix
(cf. https://sourceware.org/bugzilla/show_bug.cgi?id=17786).
To work around the issue, we change the definition of struct stat that
is used by Cython when we are compiling under mips. Note that this
requires the Cython compilation to run under mips, and that the
resulting C file will be mips specific (without the patch, the
generated C file is suitable for any architecture).
Upstream is not interested in this change for obvious reasons.
---
src/llfuse.pyx | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/llfuse.pyx b/src/llfuse.pyx
index 53a64a6..10c61a9 100644
--- a/src/llfuse.pyx
+++ b/src/llfuse.pyx
@@ -20,7 +20,24 @@ cdef extern from "llfuse.h":
from fuse_lowlevel cimport *
from pthread cimport *
-from posix.stat cimport struct_stat, S_IFMT, S_IFDIR, S_IFREG
+IF UNAME_MACHINE.startswith('mips64'):
+ cdef extern from "sys/stat.h" nogil:
+ struct stat:
+ int st_dev
+ ino_t st_ino
+ mode_t st_mode
+ nlink_t st_nlink
+ uid_t st_uid
+ gid_t st_gid
+ int st_rdev
+ off_t st_size
+ blksize_t st_blksize
+ blkcnt_t st_blocks
+ time_t st_atime
+ time_t st_mtime
+ time_t st_ctime
+ELSE:
+ from posix.stat cimport struct_stat, S_IFMT, S_IFDIR, S_IFREG
from posix.types cimport mode_t, dev_t, off_t
from libc.stdint cimport uint32_t
from libc.stdlib cimport const_char
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-llfuse.git
More information about the Python-modules-commits
mailing list