devlink and vdpa use BIT() together with 64-bit flag fields. devlink
is already using bit numbers greater than 31 and so does not work
correctly on 32-bit architectures.
Fix this by making BIT() use uint64_t instead of unsigned long.
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
+#include <stdint.h>
#ifdef HAVE_LIBBSD
#include <bsd/string.h>
unsigned int print_name_and_link(const char *fmt,
const char *name, struct rtattr *tb[]);
-#define BIT(nr) (1UL << (nr))
+#define BIT(nr) (UINT64_C(1) << (nr))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))