tools/libs/vchan: remove private offsetof() definition

vchan/init.c is defining offsetof privately. Remove that definition
and just use stddef.h instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2023-03-24 11:14:25 +01:00
1 parent 6ca13bec08
commit 809882cb34
1 file changed
+1 -4
+1 -4
View File
@@ -32,6 +32,7 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/user.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
@@ -69,10 +70,6 @@
#define MAX_RING_SHIFT 20
#define MAX_RING_SIZE (1 << MAX_RING_SHIFT)
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
static int init_gnt_srv(struct libxenvchan *ctrl, int domain)
{
int pages_left = ctrl->read.order >= PAGE_SHIFT ? 1 << (ctrl->read.order - PAGE_SHIFT) : 0;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.