diff options
author | 2001-04-06 04:46:18 +0000 | |
---|---|---|
committer | 2001-04-06 04:46:18 +0000 | |
commit | 667a02d671bccdcdbd414bea718688be80d8bb2f (patch) | |
tree | eba48ba54fe5031d8153e372ee54a7f983422ebb | |
parent | Move offsetof define into sys/param.h (diff) | |
download | wireguard-openbsd-667a02d671bccdcdbd414bea718688be80d8bb2f.tar.xz wireguard-openbsd-667a02d671bccdcdbd414bea718688be80d8bb2f.zip |
Only define offsetof for KERNEL mode. Avoids breaking userland
-rw-r--r-- | sys/sys/param.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h index 2b5c9702e51..8be7cf029ed 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.33 2001/04/06 04:42:05 csapuntz Exp $ */ +/* $OpenBSD: param.h,v 1.34 2001/04/06 04:46:18 csapuntz Exp $ */ /* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */ /*- @@ -195,7 +195,7 @@ #define MAX(a,b) (((a)>(b))?(a):(b)) /* Macros for calculating the offset of a field */ -#ifndef offsetof +#if !defined(offsetof) && defined(_KERNEL) #define offsetof(s, e) ((unsigned int)&((s *)0)->e) #endif |