From 5588f189a716b7cbf86af90e1f13bb95bf4f5791 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 6 Jul 2025 12:16:54 +1000 Subject: [PATCH] libspl: single zfs_context_os.h Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Signed-off-by: Rob Norris Closes #17861 --- lib/libspl/include/Makefile.am | 5 ++- .../include/os/freebsd/sys/zfs_context_os.h | 35 ------------------- .../{os/linux => }/sys/zfs_context_os.h | 15 +++++--- 3 files changed, 12 insertions(+), 43 deletions(-) delete mode 100644 lib/libspl/include/os/freebsd/sys/zfs_context_os.h rename lib/libspl/include/{os/linux => }/sys/zfs_context_os.h (62%) diff --git a/lib/libspl/include/Makefile.am b/lib/libspl/include/Makefile.am index 746cb12bf..3a744def6 100644 --- a/lib/libspl/include/Makefile.am +++ b/lib/libspl/include/Makefile.am @@ -65,6 +65,7 @@ libspl_sys_HEADERS = \ %D%/sys/uio.h \ %D%/sys/vnode.h \ %D%/sys/wmsum.h \ + %D%/sys/zfs_context_os.h \ %D%/sys/zone.h libspl_ia32dir = $(libspldir)/sys/ia32 @@ -79,7 +80,6 @@ libspl_sys_HEADERS += \ %D%/os/linux/sys/stat.h \ %D%/os/linux/sys/sysmacros.h \ %D%/os/linux/sys/vfs.h \ - %D%/os/linux/sys/zfs_context_os.h libspl_ia32_HEADERS = \ %D%/os/linux/sys/ia32/asm_linkage.h @@ -95,8 +95,7 @@ libspl_sys_HEADERS += \ %D%/os/freebsd/sys/param.h \ %D%/os/freebsd/sys/stat.h \ %D%/os/freebsd/sys/sysmacros.h \ - %D%/os/freebsd/sys/vfs.h \ - %D%/os/freebsd/sys/zfs_context_os.h + %D%/os/freebsd/sys/vfs.h libspl_ia32_HEADERS = \ %D%/os/freebsd/sys/ia32/asm_linkage.h diff --git a/lib/libspl/include/os/freebsd/sys/zfs_context_os.h b/lib/libspl/include/os/freebsd/sys/zfs_context_os.h deleted file mode 100644 index 1dd036d02..000000000 --- a/lib/libspl/include/os/freebsd/sys/zfs_context_os.h +++ /dev/null @@ -1,35 +0,0 @@ -// SPDX-License-Identifier: BSD-2-Clause -/* - * Copyright (c) 2020 iXsystems, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef ZFS_CONTEXT_OS_H_ -#define ZFS_CONTEXT_OS_H_ - -#define HAVE_LARGE_STACKS 1 - -#endif diff --git a/lib/libspl/include/os/linux/sys/zfs_context_os.h b/lib/libspl/include/sys/zfs_context_os.h similarity index 62% rename from lib/libspl/include/os/linux/sys/zfs_context_os.h rename to lib/libspl/include/sys/zfs_context_os.h index bbfb4d17e..4dcf386e3 100644 --- a/lib/libspl/include/os/linux/sys/zfs_context_os.h +++ b/lib/libspl/include/sys/zfs_context_os.h @@ -3,9 +3,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or https://opensource.org/licenses/CDDL-1.0. @@ -20,9 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. + */ -#ifndef ZFS_CONTEXT_OS_H -#define ZFS_CONTEXT_OS_H +#ifndef ZFS_CONTEXT_OS_H_ +#define ZFS_CONTEXT_OS_H_ #define HAVE_LARGE_STACKS 1