mirror of https://github.com/vishvananda/netlink
Merge pull request #100 from drzaeus77/master
Fix 32bit warnings in bpf_linux.go
This commit is contained in:
commit
d4955d161c
|
@ -5,6 +5,7 @@ package netlink
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static int load_simple_bpf(int prog_type) {
|
static int load_simple_bpf(int prog_type) {
|
||||||
|
@ -30,8 +31,8 @@ static int load_simple_bpf(int prog_type) {
|
||||||
} __attribute__((aligned(8))) attr = {
|
} __attribute__((aligned(8))) attr = {
|
||||||
.prog_type = prog_type,
|
.prog_type = prog_type,
|
||||||
.insn_cnt = 2,
|
.insn_cnt = 2,
|
||||||
.insns = (__u64)&insns,
|
.insns = (uintptr_t)&insns,
|
||||||
.license = (__u64)&license,
|
.license = (uintptr_t)&license,
|
||||||
};
|
};
|
||||||
return syscall(__NR_bpf, 5, &attr, sizeof(attr));
|
return syscall(__NR_bpf, 5, &attr, sizeof(attr));
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue