Fix FreeBSD build.
[haiku.git] / src / tools / fs_shell / errno.cpp
blob06fd7ef30a239b3300330a1b427419d7cd69c3c7
1 /*
2 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de.
3 * Distributed under the terms of the MIT License.
4 */
6 #include "compatibility.h"
8 #include "fssh_errno.h"
10 #include <errno.h>
13 int *
14 _fssh_errnop(void)
16 return &errno;
20 int
21 fssh_get_errno(void)
23 return errno;
27 void
28 fssh_set_errno(int error)
30 errno = error;
33 int
34 fssh_to_host_error(int error)
36 #if (defined(__BEOS__) || defined(__HAIKU__))
37 return error;
38 #else
39 return _haiku_to_host_error(error);
40 #endif