File: os_compat.h

package info (click to toggle)
alsa-utils 1.2.15.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,756 kB
  • sloc: ansic: 48,157; sh: 7,881; makefile: 604; xml: 590; sed: 16
file content (43 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * ALSA lib - compatibility header for supporting various OSes
 * Copyright (C) 2022 by Takayoshi SASANO <uaa@cvs.openbsd.org>
 *
 *
 *   This library is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as
 *   published by the Free Software Foundation; either version 2.1 of
 *   the License, or (at your option) any later version.
 *
 *   This program 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 Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef __OS_COMPAT_H
#define __OS_COMPAT_H

#ifndef ESTRPIPE
#define ESTRPIPE ESPIPE
#endif

#ifndef ERESTART
#define ERESTART EINTR
#endif

#ifndef SCHED_IDLE
#define SCHED_IDLE SCHED_OTHER
#endif

#if defined(__OpenBSD__)
/* these functions in <sched.h> are not implemented */
#define sched_getparam(pid, param) (-1)
#define sched_setscheduler(pid, policy, param) (-1)
#endif

#endif