1 #pragma once
2
3 // Copyright transferred from Raider Solutions, Inc to
4 // Kern Sibbald and John Walker by express permission.
5 //
6 // Copyright (C) 2004-2006 Kern Sibbald
7 // Copyright (C) 2014 Adam Kropelin
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License as
11 // published by the Free Software Foundation; either version 2 of
12 // the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // General Public License for more details.
18 //
19 // You should have received a copy of the GNU General Public
20 // License along with this program; if not, write to the Free
21 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 // MA 02111-1307, USA.
23
24 #ifndef __COMPAT_UNISTD_H_
25 #define __COMPAT_UNISTD_H_
26
27 #include_next <unistd.h>
28
29 #define _PC_PATH_MAX 1
30 #define _PC_NAME_MAX 2
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 long pathconf(const char *, int);
37 #define getpid _getpid
38 #define getppid() 0
39
40 unsigned int sleep(unsigned int seconds);
41
42 #define getuid() 0
43 #define getgid() 0
44 #define geteuid() 1
45 #define getegid() 0
46
47 // no-oped sync
sync(void)48 __inline void sync(void){};
49
50 #ifdef __cplusplus
51 };
52 #endif
53
54 #endif /* __COMPAT_UNISTD_H_ */