Skip to content

Commit 7b24736

Browse files
Typedef for __kernel_sa_family_t in _fake_typedefs.h (#578)
This typedef that exists in the real `linux/socket.h` is masked by the `fake_libc_include` hierarchy. Having it in place allows to successfully parse a large number of Linux kernel headers necessary for netlink operations. This is very useful for Python projects that communicate with the kernel over netlink socket. In particular, this project: https://github.com/ionos-cloud/netlinklib/tree/main/netlinklib plans to use pyparser for parsing strcts defined in the kernel headers. Signed-off-by: Eugene Crosser <[email protected]> Co-authored-by: Eugene Crosser <[email protected]>
1 parent 90184f1 commit 7b24736

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/fake_libc_include/_fake_typedefs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ typedef void* DIR;
183183
/* socket typedefs */
184184
typedef __uint32_t __socklen_t;
185185
typedef __socklen_t socklen_t;
186+
typedef unsigned short __kernel_sa_family_t;
186187

187188
/* C11 stdatomic.h types */
188189
typedef _Atomic(_Bool) atomic_bool;

0 commit comments

Comments
 (0)