aports/community/libteam/swig4.3.patch
mio 5f419e49fc community/libteam: fix build with swig 4.3
Fix error with newer swig.

```
team/capi_wrap.c: In function '_wrap_team_hwaddr_get':
team/capi_wrap.c:3945:17: error: too few arguments to function 'SWIG_Python_AppendOutput'
 3945 |     resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtrAndSize(arg3,arg4));
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
team/capi_wrap.c:1260:1: note: declared here
 1260 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void) {
      | ^~~~~~~~~~~~~~~~~~~~~~~~
```
2024-10-30 05:05:47 +00:00

12 lines
466 B
Diff

--- a/binding/python/team/capi.i.in
+++ b/binding/python/team/capi.i.in
@@ -40,7 +40,7 @@
if ($1) free($1);
}
%typemap(argout) (char *addr, unsigned int addr_len) {
- $result = SWIG_Python_AppendOutput($result, SWIG_FromCharPtrAndSize($1,$2));
+ $result = SWIG_AppendOutput($result, SWIG_FromCharPtrAndSize($1,$2));
}
%apply char *OUTPUT {char *addr};
int team_hwaddr_get(struct team_handle *th, uint32_t ifindex, char *addr, unsigned int addr_len);