- Set a default PCM volume so that something can be heard when driver is
[AROS.git] / arch / all-unix / kernel / obtaininput.c
blob17892e83942a1e56e21b4d90efdc727c0010f9cb
1 /*
2 * Include these before AROS includes, because __unused as a macro in AROS,
3 * causing conflicts with __unused being a structure member name in Linux bits/stat.h.
4 */
6 #include <fcntl.h>
7 #include <unistd.h>
9 #include <aros/kernel.h>
10 #include <aros/libcall.h>
12 #include "kernel_base.h"
13 #include "kernel_intern.h"
15 AROS_LH0I(int, KrnObtainInput,
16 struct KernelBase *, KernelBase, 33, Kernel)
18 AROS_LIBFUNC_INIT
20 int res;
22 /* Set our STDERR to non-blocking mode for RawMayGetChar() to work */
23 res = KernelIFace.fcntl(STDERR_FILENO, F_GETFL);
24 AROS_HOST_BARRIER
25 res = KernelIFace.fcntl(STDERR_FILENO, F_SETFL, res|O_NONBLOCK);
26 AROS_HOST_BARRIER
28 return (res == -1) ? 0 : 1;
30 AROS_LIBFUNC_EXIT