mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
xdr: header cleanup
#16047 notes that include/os/freebsd/spl/rpc/xdr.h carried an (apparently) incompatible license. While looking into it, it seems that this file is actually unnecessary these days - FreeBSD's kernel XDR has XDR_CONTROL, xdrmem_control and XDR_GET_BYTES_AVAIL, while userspace has XDR_CONTROL and xdrmem_control, and our implementation of XDR_GET_BYTES_AVAIL for libspl works nicely with it. So this removes that file outright. To keep the includes in nvpair.c tidy, I've made a few small adjustments to the Linux headers. By definition, rpc/types.h provides bool_t and is included before rpc/xdr.h, so I've created rpc/types.h for Linux. This isn't necessary for userspace; both FreeBSD native and tirpc on Linux already have these headers set up correctly. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #16047 Closes #16051
This commit is contained in:
@@ -47,6 +47,7 @@ kernel_sys_HEADERS = \
|
||||
|
||||
kernel_spl_rpcdir = $(kerneldir)/spl/rpc
|
||||
kernel_spl_rpc_HEADERS = \
|
||||
%D%/spl/rpc/types.h \
|
||||
%D%/spl/rpc/xdr.h
|
||||
|
||||
kernel_spl_sysdir = $(kerneldir)/spl/sys
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2008 Sun Microsystems, Inc.
|
||||
* Written by Ricardo Correia <Ricardo.M.Correia@Sun.COM>
|
||||
*
|
||||
* This file is part of the SPL, Solaris Porting Layer.
|
||||
*
|
||||
* The SPL is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* The SPL is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SPL_RPC_TYPES_H
|
||||
#define _SPL_RPC_TYPES_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Just enough to support rpc/xdr.h */
|
||||
|
||||
typedef int bool_t;
|
||||
|
||||
#endif /* SPL_RPC_TYPES_H */
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef int bool_t;
|
||||
|
||||
/*
|
||||
* XDR enums and types.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user