diff options
Diffstat (limited to 'lib/libspl/include/zone.h')
-rw-r--r-- | lib/libspl/include/zone.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libspl/include/zone.h b/lib/libspl/include/zone.h index b0ac2d9bc..0af4e7a2f 100644 --- a/lib/libspl/include/zone.h +++ b/lib/libspl/include/zone.h @@ -33,7 +33,17 @@ extern "C" { #endif -#define GLOBAL_ZONEID 0 +#ifdef __FreeBSD__ +#define GLOBAL_ZONEID 0 +#else +/* + * Hardcoded in the kernel's root user namespace. A "better" way to get + * this would be by using ioctl_ns(2), but this would need to be performed + * recursively on NS_GET_PARENT and then NS_GET_USERNS. Also, that's only + * supported since Linux 4.9. + */ +#define GLOBAL_ZONEID 4026531837U +#endif extern zoneid_t getzoneid(void); |