From: Rishabh Dave Date: Wed, 8 Oct 2025 17:11:25 +0000 (+0530) Subject: pybind/cephfs: fix including of platform_errno.h X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=805eb2f7d4eb9f33b19a8a2c7bb57e42c0cf9226;p=ceph.git pybind/cephfs: fix including of platform_errno.h Introduced-by: 2439bcb87398 Fixes: https://tracker.ceph.com/issues/73435 Signed-off-by: Rishabh Dave --- diff --git a/src/pybind/cephfs/c_cephfs.pxd b/src/pybind/cephfs/c_cephfs.pxd index 30e9a246d33..141ad718667 100644 --- a/src/pybind/cephfs/c_cephfs.pxd +++ b/src/pybind/cephfs/c_cephfs.pxd @@ -4,6 +4,10 @@ from libc.stdint cimport * from types cimport * +cdef extern from "../include/platform_errno.h": + ctypedef signed int int32_t; + int32_t ceph_to_hostos_errno(int32_t e) + cdef extern from "cephfs/ceph_ll_client.h": cdef struct statx "ceph_statx": uint32_t stx_mask diff --git a/src/pybind/cephfs/mock_cephfs.pxi b/src/pybind/cephfs/mock_cephfs.pxi index 631625e861a..fcda27bbc35 100644 --- a/src/pybind/cephfs/mock_cephfs.pxi +++ b/src/pybind/cephfs/mock_cephfs.pxi @@ -4,6 +4,11 @@ from libc.stdint cimport * from types cimport timespec +cdef: + int32_t ceph_to_hostos_errno(int32_t e): + pass + + cdef: cdef struct statx "ceph_statx": uint32_t stx_mask diff --git a/src/pybind/cephfs/types.pxd b/src/pybind/cephfs/types.pxd index d59664ec07c..cbe31cbf4ba 100644 --- a/src/pybind/cephfs/types.pxd +++ b/src/pybind/cephfs/types.pxd @@ -55,7 +55,3 @@ ELSE: unsigned short int d_reclen unsigned char d_type char d_name[256] - -cdef extern from "../../include/platform_errno.h": - ctypedef signed int int32_t; - int32_t ceph_to_hostos_errno(int32_t e)