summaryrefslogtreecommitdiffstats
path: root/lib/util/compat.h
blob: f058e9cd74ac8fc790dcbdd2fe11b92a3c8b4726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef __COMPAT_H
#define __COMPAT_H

#ifndef HAVE_LIBBPF_BTF__TYPE_CNT
static __u32 btf__type_cnt(const struct btf *btf)
{
	/* old function didn't include 'void' type in count */
	return btf__get_nr_types(btf) + 1;
}
#endif

#endif