SHA256
1
0
forked from pool/bcache-tools
bcache-tools/0006-bcache-tools-list.h-only-define-offsetof-when-it-is-.patch
Jan Engelhardt 3dff4d17f4 Accepting request 841483 from home:colyli:branches:filesystems
- Remove dependence of smartcols bcache-tools.spec, bcache-tools
  code doesn't need it now. (jsc#SLE-9807)
- Remove 1001-udev-do-not-rely-on-DRIVER-variable.patch because
  we have 0013-bcache-tools-Export-CACHED_UUID-and-CACHED_LABEL.patch
  to provide static UUIDs. (jsc#SLE-9807)
- bcache-tools: add man page bcache-status.8 (jsc#SLE-9807)
  0017-bcache-tools-add-man-page-bcache-status.8.patch
- bcache-tools: add bcache-status (jsc#SLE-9807)
  0016-bcache-tools-add-bcache-status.patch
- bcache-tools: make: permit only one cache device to be
  specified (jsc#SLE-9807)
  0015-bcache-tools-make-permit-only-one-cache-device-to-be.patch
- bcache-tools: Remove the dependency on libsmartcols
  (jsc#SLE-9807)
  0014-bcache-tools-Remove-the-dependency-on-libsmartcols.patch
- bcache-tools: Export CACHED_UUID and CACHED_LABEL
  (jsc#SLE-9807)
  0013-bcache-tools-Export-CACHED_UUID-and-CACHED_LABEL.patch
- bcache-tools: Fix potential coredump issues (jsc#SLE-9807)
  0012-bcache-tools-Fix-potential-coredump-issues.patch
- bcache-tools: add print_cache_set_supported_feature_sets()
  in lib.c (jsc#SLE-9807)
  0011-bcache-tools-add-print_cache_set_supported_feature_s.patch
- bcache-tools: add large_bucket incompat feature (jsc#SLE-9807)
  0010-bcache-tools-add-large_bucket-incompat-feature.patch
- bcache-tools: upgrade super block versions for feature sets
  (jsc#SLE-9807)
  0009-bcache-tools-upgrade-super-block-versions-for-featur.patch
- bcache-tools: define separated super block for in-memory and
  on-disk format (jsc#SLE-9807)

OBS-URL: https://build.opensuse.org/request/show/841483
OBS-URL: https://build.opensuse.org/package/show/filesystems/bcache-tools?expand=0&rev=27
2020-10-30 14:10:22 +00:00

41 lines
1014 B
Diff

From 1129319af1cb5ec0cd38b283a4a3d14e55d616c7 Mon Sep 17 00:00:00 2001
From: Coly Li <colyli@suse.de>
Date: Sun, 16 Aug 2020 23:57:56 +0800
Subject: [PATCH 06/17] bcache-tools: list.h: only define offsetof() when it is
undefined
Git-commit: 1129319af1cb5ec0cd38b283a4a3d14e55d616c7
Patch-mainline: bcache-tools-1.1
References: jsc#SLE-9807
For new gcc headers, offsetof() is defined, the definition in list.h
will be warned as redefined.
This patch checks whether offsetof() is defined, and only defines local
version of offsetof() when it is not defined by gcc headers.
Signed-off-by: Coly Li <colyli@suse.de>
---
list.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/list.h b/list.h
index 55d2bb4..458281d 100644
--- a/list.h
+++ b/list.h
@@ -25,10 +25,12 @@
*/
/*@{*/
+#ifndef offsetof
/**
* Get offset of a member
*/
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif /* offsetof*/
/**
* Casts a member of a structure out to the containing structure
--
2.26.2