diff --git a/math/py-faiss/files/patch-swig b/math/py-faiss/files/patch-swig new file mode 100644 index 000000000000..1aa5f58bcbd8 --- /dev/null +++ b/math/py-faiss/files/patch-swig @@ -0,0 +1,21 @@ +Obtained from: https://github.com/facebookresearch/faiss/commit/d6854136afa3b987defb2c8e8108bad76ebdb949 + +--- swigfaiss.swig.orig 2024-02-29 21:24:50 UTC ++++ swigfaiss.swig +@@ -1022,14 +1022,14 @@ PyObject *swig_ptr (PyObject *a) + return SWIG_NewPointerObj(data, SWIGTYPE_p_bool, 0); + } + if(PyArray_TYPE(ao) == NPY_UINT64) { +-#ifdef SWIGWORDSIZE64 ++#if (__SIZEOF_LONG__ == 8) + return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0); + #else + return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long_long, 0); + #endif + } + if(PyArray_TYPE(ao) == NPY_INT64) { +-#ifdef SWIGWORDSIZE64 ++#if (__SIZEOF_LONG__ == 8) + return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0); + #else + return SWIG_NewPointerObj(data, SWIGTYPE_p_long_long, 0);