Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CentOS 5] ethtool.h : error: unknown type name '__u32' #2371

Closed
lmunch opened this issue Feb 9, 2024 · 1 comment
Closed

[CentOS 5] ethtool.h : error: unknown type name '__u32' #2371

lmunch opened this issue Feb 9, 2024 · 1 comment

Comments

@lmunch
Copy link

lmunch commented Feb 9, 2024

Summary

  • CentOS 5... yeah, I know :-)
  • Architecture: 64bit, 32bit, ARM, PowerPC, s390 }
  • Psutil version: 5.9.7+5.9.8
  • Python version: 3.12.1
  • Type: Build issue

Description

gcc-4.9 -std=gnu11 -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=597 -DPy_LIMITED_API=0x03060000 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -DPSUTIL_LINUX=1 -I/opt/python3/include/python3.12 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-cpython-312/psutil/_psutil_linux.o
In file included from psutil/_psutil_linux.c:13:0:
/usr/include/linux/ethtool.h:18:2: error: unknown type name '__u32'
__u32 cmd;
^
/usr/include/linux/ethtool.h:19:2: error: unknown type name '__u32'
__u32 supported; /* Features this interface supports /
^
/usr/include/linux/ethtool.h:20:2: error: unknown type name '__u32'
__u32 advertising; /
Features this interface advertises */

This commit broke build on CentOS 5: a7205fc

linux/ethtool.h is included in psutil/_psutil_linux.c but without defining the types first as in psutil/arch/linux/net.c:

// see: #659
#ifdef PSUTIL_ETHTOOL_MISSING_TYPES
#include <linux/types.h>
typedef __u64 u64;
typedef __u32 u32;
typedef __u16 u16;
typedef __u8 u8;
#endif

@lmunch lmunch added the bug label Feb 9, 2024
@github-actions github-actions bot added the linux label Feb 9, 2024
@giampaolo
Copy link
Owner

According to wikipedia https://en.wikipedia.org/wiki/CentOS CentOS 5 was released in 2007 (!) and support ended on 2017. Too old. :)

Closing as won't fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants