aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2023-06-05 00:30:26 +0200
committerMichal Kubecek <mkubecek@suse.cz>2023-06-05 00:30:26 +0200
commita6505f3b21049a1b95828ec10806c5e381887023 (patch)
treef5ec13318d6c1f980d3496be54bb897cc1602a3a
parent86c0c411eae9ff4b0ed68119d8cbbb50608057cd (diff)
downloadethtool-a6505f3b21049a1b95828ec10806c5e381887023.tar.gz
drop checks for macros provided in UAPI header copies
Macros NETLINK_GENERIC and __KERNEL_DIV_ROUND_UP are now provided in UAPI header copies so that we no longer need to check if they are defined and provide fallback definitions. Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
-rw-r--r--ethtool.c4
-rw-r--r--internal.h6
2 files changed, 0 insertions, 10 deletions
diff --git a/ethtool.c b/ethtool.c
index 67107ae..b7d173b 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -58,10 +58,6 @@
#define MAX_ADDR_LEN 32
#endif
-#ifndef NETLINK_GENERIC
-#define NETLINK_GENERIC 16
-#endif
-
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
static void exit_bad_args(void) __attribute__((noreturn));
diff --git a/internal.h b/internal.h
index 42f7eeb..4b6d687 100644
--- a/internal.h
+++ b/internal.h
@@ -42,12 +42,6 @@ typedef uint16_t u16;
typedef uint8_t u8;
typedef int32_t s32;
-/* ethtool.h epxects __KERNEL_DIV_ROUND_UP to be defined by <linux/kernel.h> */
-#include <linux/kernel.h>
-#ifndef __KERNEL_DIV_ROUND_UP
-#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
-#endif
-
#include <linux/ethtool.h>
#include <linux/net_tstamp.h>