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