From 1afc54f7f4f88902d0a3a3d88f6c7c6311c886ee Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Sun, 8 Jul 2012 19:01:30 +0100 Subject: [PATCH] OpenZFS 2976 - remove useless offsetof() macros Authored by: Richard Lowe Reviewed by: Josef 'Jeff' Sipek Reviewed by: Igor Kozhukhov Reviewed by: Andy Stormont Approved by: Dan McDonald Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Ported-by: Giuseppe Di Natale OpenZFS-issue: https://www.illumos.org/issues/2976 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/5c5f137 Closes #6582 --- module/nvpair/nvpair.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index c0155f729..5ce389f14 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -37,16 +37,15 @@ #include #include #include +#include #else #include #include #include #include +#include #endif -#ifndef offsetof -#define offsetof(s, m) ((size_t)(&(((s *)0)->m))) -#endif #define skip_whitespace(p) while ((*(p) == ' ') || (*(p) == '\t')) p++ /*