]> git.proxmox.com Git - mirror_zfs.git/commitdiff
OpenZFS 2976 - remove useless offsetof() macros
authorRichard Lowe <richlowe@richlowe.net>
Sun, 8 Jul 2012 18:01:30 +0000 (19:01 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 30 Aug 2017 22:53:38 +0000 (15:53 -0700)
Authored by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Andy Stormont <andyjstormont@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/2976
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/5c5f137
Closes #6582

module/nvpair/nvpair.c

index c0155f729b3e581f8cb6db9eb2ea8d9a97227a34..5ce389f142b3410c7c6772d71baed6f19b8a877f 100644 (file)
 #include <sys/varargs.h>
 #include <sys/ddi.h>
 #include <sys/sunddi.h>
+#include <sys/sysmacros.h>
 #else
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
+#include <stddef.h>
 #endif
 
-#ifndef        offsetof
-#define        offsetof(s, m)          ((size_t)(&(((s *)0)->m)))
-#endif
 #define        skip_whitespace(p)      while ((*(p) == ' ') || (*(p) == '\t')) p++
 
 /*