/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2018 SRI International4* All rights reserved.5*6* This software was developed by SRI International and the University of7* Cambridge Computer Laboratory (Department of Computer Science and8* Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the9* DARPA SSITH research programme.10*11* Redistribution and use in source and binary forms, with or without12* modification, are permitted provided that the following conditions13* are met:14* 1. Redistributions of source code must retain the above copyright15* notice, this list of conditions and the following disclaimer.16* 2. Redistributions in binary form must reproduce the above copyright17* notice, this list of conditions and the following disclaimer in the18* documentation and/or other materials provided with the distribution.19*20* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND21* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE24* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL25* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS26* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT28* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY29* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF30* SUCH DAMAGE.31*/3233#include <sys/types.h>34#include <sys/errno.h>3536/*37* XXX: Ideally we'd use a common function rather than generating one38* for each compat symbol, but the bfd linker in base rejects that.39* This should be revisited once we're using only modern linkers.40*/41#define __compat_nosys(symbol, version) \42int __compat_enosys ## symbol(void); \43int \44__compat_enosys ## symbol(void) \45{ \46\47return (ENOSYS); \48} \49__sym_compat(symbol, __compat_enosys ## symbol, version)5051__compat_nosys(netbsd_lchown, FBSD_1.0);52__compat_nosys(netbsd_msync, FBSD_1.0);53__compat_nosys(numa_getaffinity, FBSD_1.4);54__compat_nosys(numa_setaffinity, FBSD_1.4);555657