diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2017-12-21 11:35:08 +0100 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2018-02-16 20:19:40 -0500 |
commit | a1a6120c34133d87bedfb04ab06ce43097c5e0d2 (patch) | |
tree | 5e0880ef9eb20382e636cfd4dfcace871e4c1481 | |
parent | cf7b3fe48917a8b5d2005404142a3ba0cf0fa7ad (diff) | |
download | mmc-utils-old-a1a6120c34133d87bedfb04ab06ce43097c5e0d2.tar.gz |
mmc-utils: move offsetof from mmc.h to only user
offsetof isn't mmc specific, so remove it from mmc.h. As there is only a
single user define it there.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r-- | mmc.h | 4 | ||||
-rw-r--r-- | mmc_cmds.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -19,10 +19,6 @@ #include <linux/mmc/ioctl.h> -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - /* From kernel linux/major.h */ #define MMC_BLOCK_MAJOR 179 @@ -38,6 +38,10 @@ #include "mmc_cmds.h" #include "3rdparty/hmac_sha/hmac_sha2.h" +#ifndef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) +#endif + #define WP_BLKS_PER_QUERY 32 #define USER_WP_PERM_PSWD_DIS 0x80 |