]> git.pld-linux.org Git - packages/klibc.git/blob - klibc-dirent.patch
- crossbuild only in (manual) hacker mode.
[packages/klibc.git] / klibc-dirent.patch
1 --- klibc-0.193/kinit/do_mounts.c.orig  2004-12-12 21:12:27.000000000 +0100
2 +++ klibc-0.193/kinit/do_mounts.c       2004-12-12 21:13:41.211035224 +0100
3 @@ -1,6 +1,7 @@
4  #include <ctype.h>
5  #include <errno.h>
6  #include <fcntl.h>
7 +#include <sys/dirent.h>
8  #include <sys/mount.h>
9  #include <sys/stat.h>
10  #include <stdio.h>
11 @@ -162,8 +163,8 @@
12  
13         if (!p)
14                 return -1;
15 -       for (s = p; s < p + size; s += ((struct linux_dirent64 *)s)->d_reclen) {
16 -               struct linux_dirent64 *d = (struct linux_dirent64 *)s;
17 +       for (s = p; s < p + size; s += ((struct dirent *)s)->d_reclen) {
18 +               struct dirent *d = (struct dirent *)s;
19                 if (strlen(d->d_name) + 2 > rest)
20                         continue;
21                 switch (d->d_type) {
22 --- klibc-0.193/include/sys/dirent.h.orig       2004-06-08 07:32:48.000000000 +0200
23 +++ klibc-0.193/include/sys/dirent.h    2004-12-12 21:42:06.398807280 +0100
24 @@ -18,4 +18,27 @@
25  
26  __extern int getdents(unsigned int, struct dirent *, unsigned int);
27  
28 +/* File types for `d_type'.  */
29 +enum
30 +  {
31 +    DT_UNKNOWN = 0,
32 +# define DT_UNKNOWN    DT_UNKNOWN
33 +    DT_FIFO = 1,
34 +# define DT_FIFO       DT_FIFO
35 +    DT_CHR = 2,
36 +# define DT_CHR                DT_CHR
37 +    DT_DIR = 4,
38 +# define DT_DIR                DT_DIR
39 +    DT_BLK = 6,
40 +# define DT_BLK                DT_BLK
41 +    DT_REG = 8,
42 +# define DT_REG                DT_REG
43 +    DT_LNK = 10,
44 +# define DT_LNK                DT_LNK
45 +    DT_SOCK = 12,
46 +# define DT_SOCK       DT_SOCK
47 +    DT_WHT = 14
48 +# define DT_WHT                DT_WHT
49 +  };
50 +
51  #endif /* _SYS_DIRENT_H */
This page took 0.038378 seconds and 3 git commands to generate.