All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>, Wei Liu <wl@xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: [PATCH v5 4/5] tools/libfsimage: remove private offsetof() definition
Date: Thu, 23 Mar 2023 10:08:58 +0100	[thread overview]
Message-ID: <20230323090859.25240-5-jgross@suse.com> (raw)
In-Reply-To: <20230323090859.25240-1-jgross@suse.com>

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

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V4:
- new patch
---
 tools/libfsimage/xfs/fsys_xfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/libfsimage/xfs/fsys_xfs.c b/tools/libfsimage/xfs/fsys_xfs.c
index d735a88e55..b8b4ca928c 100644
--- a/tools/libfsimage/xfs/fsys_xfs.c
+++ b/tools/libfsimage/xfs/fsys_xfs.c
@@ -17,6 +17,7 @@
  *  along with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stddef.h>
 #include <xenfsimage_grub.h>
 #include "xfs.h"
 
@@ -182,9 +183,6 @@ fsb2daddr (xfs_fsblock_t fsbno)
 			 (xfs_agblock_t)(fsbno & mask32lo(xfs.agblklog)));
 }
 
-#undef offsetof
-#define offsetof(t,m)	((size_t)&(((t *)0)->m))
-
 static inline int
 btroot_maxrecs (fsi_file_t *ffi)
 {
-- 
2.35.3



  parent reply	other threads:[~2023-03-23  9:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  9:08 [PATCH v5 0/5] tools: use xen-tools/libs.h for common definitions Juergen Gross
2023-03-23  9:08 ` [PATCH v5 1/5] tools: get rid of additional min() and max() definitions Juergen Gross
2023-03-23  9:51   ` Jan Beulich
2023-03-23 11:06   ` Anthony PERARD
2023-03-23  9:08 ` [PATCH v5 2/5] tools: add container_of() macro to xen-tools/common-macros.h Juergen Gross
2023-03-23 11:10   ` Anthony PERARD
2023-03-23  9:08 ` [PATCH v5 3/5] tools/hvmloader: remove private offsetof() definition Juergen Gross
2023-03-23 10:09   ` Jan Beulich
2023-03-23 10:12     ` Juergen Gross
2023-03-23  9:08 ` Juergen Gross [this message]
2023-03-23 11:32   ` [PATCH v5 4/5] tools/libfsimage: " Anthony PERARD
2023-03-23  9:08 ` [PATCH v5 5/5] tools/libs/vchan: " Juergen Gross
2023-03-23 11:33   ` Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230323090859.25240-5-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.