chiark / gitweb /
udevadm: info - fix broken --device-id-of-file=
[elogind.git] / udev / udev_sysdeps.h
1 /*
2  * wrapping of libc features and kernel interfaces
3  *
4  * Copyright (C) 2005-2008 Kay Sievers <kay.sievers@vrfy.org>
5  *
6  *      This program is free software; you can redistribute it and/or modify it
7  *      under the terms of the GNU General Public License as published by the
8  *      Free Software Foundation version 2 of the License.
9  * 
10  *      This program is distributed in the hope that it will be useful, but
11  *      WITHOUT ANY WARRANTY; without even the implied warranty of
12  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *      General Public License for more details.
14  * 
15  *      You should have received a copy of the GNU General Public License along
16  *      with this program; if not, write to the Free Software Foundation, Inc.,
17  *      51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  *
19  */
20
21 #ifndef _UDEV_SYSDEPS_H_
22 #define _UDEV_SYSDEPS_H_
23
24 #include <stdint.h>
25
26 /* needed for our signal handlers to work */
27 #undef asmlinkage
28 #ifdef __i386__
29 #define asmlinkage      __attribute__((regparm(0)))
30 #else
31 #define asmlinkage
32 #endif /* __i386__ */
33
34 #ifndef HAVE_INOTIFY
35 static inline int inotify_init(void)
36 {
37         return -1;
38 }
39
40 static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
41 {
42         return -1;
43 }
44
45 #define IN_CREATE       0
46 #define IN_DELETE       0
47 #define IN_MOVE         0
48 #define IN_CLOSE_WRITE  0
49
50 #endif
51
52 #ifndef HAVE_STRLCPY
53 extern size_t strlcpy(char *dst, const char *src, size_t size);
54 extern size_t strlcat(char *dst, const char *src, size_t size);
55 #endif
56
57 #endif