1 /* 2 * ALSA lib - compatibility header for supporting various OSes 3 * Copyright (C) 2022 by Takayoshi SASANO <uaa@cvs.openbsd.org> 4 * 5 * 6 * This library is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as 8 * published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 22 #ifndef __OS_COMPAT_H 23 #define __OS_COMPAT_H 24 25 #ifndef ESTRPIPE 26 #define ESTRPIPE ESPIPE 27 #endif 28 29 #ifndef ERESTART 30 #define ERESTART EINTR 31 #endif 32 33 #ifndef SCHED_IDLE 34 #define SCHED_IDLE SCHED_OTHER 35 #endif 36 37 #if defined(__OpenBSD__) 38 /* these functions in <sched.h> are not implemented */ 39 #define sched_getparam(pid, param) (-1) 40 #define sched_setscheduler(pid, policy, param) (-1) 41 #endif 42 43 #endif 44