49 |
|
#include <sys/socket.h> |
50 |
|
#include <net/if.h> |
51 |
|
#include <ctype.h> |
52 |
– |
/* Stuff which could be defined by defining KERNEL, but |
53 |
– |
* that would be a bad idea, so we'll just declare it here |
54 |
– |
*/ |
52 |
|
#include <linux/version.h> |
53 |
< |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
54 |
< |
typedef __uint8_t __u8; |
55 |
< |
typedef __uint16_t __u16; |
59 |
< |
typedef __uint32_t __u32; |
60 |
< |
typedef __uint64_t __u64; |
61 |
< |
#else |
53 |
> |
#include <asm/types.h> |
54 |
> |
/* These aren't defined by asm/types.h unless the kernel is being |
55 |
> |
compiled, but some versions of ethtool.h need them. */ |
56 |
|
typedef __uint8_t u8; |
57 |
|
typedef __uint16_t u16; |
58 |
|
typedef __uint32_t u32; |
59 |
|
typedef __uint64_t u64; |
66 |
– |
#endif |
60 |
|
#include <linux/ethtool.h> |
61 |
|
#include <linux/sockios.h> |
62 |
|
#include <unistd.h> |