From 805eb2f7d4eb9f33b19a8a2c7bb57e42c0cf9226 Mon Sep 17 00:00:00 2001 From: Rishabh Dave Date: Wed, 8 Oct 2025 22:41:25 +0530 Subject: [PATCH] pybind/cephfs: fix including of platform_errno.h Introduced-by: 2439bcb87398 Fixes: https://tracker.ceph.com/issues/73435 Signed-off-by: Rishabh Dave --- src/pybind/cephfs/c_cephfs.pxd | 4 ++++ src/pybind/cephfs/mock_cephfs.pxi | 5 +++++ src/pybind/cephfs/types.pxd | 4 ---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pybind/cephfs/c_cephfs.pxd b/src/pybind/cephfs/c_cephfs.pxd index 30e9a246d335d..141ad71866748 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 631625e861a34..fcda27bbc357c 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 d59664ec07cd6..cbe31cbf4ba80 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) -- 2.39.5