mesa upgraded to version 17.3.1
[dragora.git] / patches / findutils / findutils-O_SEARCH
blob603a29904454c8af1c5ac268ef856cffdec94097
1 --- gl/lib/chdir-long.c.orig    2012-12-15 10:42:45.000000000 -0300
2 +++ gl/lib/chdir-long.c 2013-03-08 09:44:47.000000000 -0300
3 @@ -72,7 +72,7 @@
4  cdb_advance_fd (struct cd_buf *cdb, char const *dir)
5  {
6    int new_fd = openat (cdb->fd, dir,
7 -                       O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
8 +                       O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
9    if (new_fd < 0)
10      return -1;
12 --- gl/lib/fts.c.orig   2012-12-15 10:42:45.000000000 -0300
13 +++ gl/lib/fts.c        2013-03-08 09:47:00.000000000 -0300
14 @@ -364,7 +364,7 @@
15  internal_function
16  diropen (FTS const *sp, char const *dir)
17  {
18 -  int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
19 +  int open_flags = (O_DIRECTORY | O_NOCTTY | O_NONBLOCK
20                      | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)
21                      | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
23 @@ -424,7 +424,7 @@
24                 later (where it'd be messier) that "." can in fact
25                 be opened.  If not, revert to FTS_NOCHDIR mode.  */
26              int fd = open (".",
27 -                           O_SEARCH | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
28 +                           0 | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));
29              if (fd < 0)
30                {
31                  /* Even if "." is unreadable, don't revert to FTS_NOCHDIR mode
32 @@ -1752,7 +1752,7 @@
33        int fd = i_ring_pop (&fd_w);
34        if (0 <= fd)
35          {
36 -          int parent_fd = openat (cwd_fd, "..", O_SEARCH | O_NOATIME);
37 +          int parent_fd = openat (cwd_fd, "..", 0 | O_NOATIME);
38            if (parent_fd < 0)
39              {
40                // Warn?
41 --- gl/lib/openat-proc.c.orig   2012-12-15 10:42:45.000000000 -0300
42 +++ gl/lib/openat-proc.c        2013-03-08 09:50:16.000000000 -0300
43 @@ -75,7 +75,7 @@
44           running on Solaris 10.  */
46        int proc_self_fd = open ("/proc/self/fd",
47 -                               O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
48 +                               O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
49        if (proc_self_fd < 0)
50          proc_status = -1;
51        else
52 --- gl/lib/openat.c.orig        2012-12-15 10:42:45.000000000 -0300
53 +++ gl/lib/openat.c     2013-03-08 09:51:06.000000000 -0300
54 @@ -265,7 +265,7 @@
55  openat_needs_fchdir (void)
56  {
57    bool needs_fchdir = true;
58 -  int fd = open ("/", O_SEARCH);
59 +  int fd = open ("/", 0);
61    if (0 <= fd)
62      {
63 --- gl/lib/save-cwd.c.orig      2012-12-15 10:42:45.000000000 -0300
64 +++ gl/lib/save-cwd.c   2013-03-08 09:52:12.000000000 -0300
65 @@ -64,7 +64,7 @@
66  {
67    cwd->name = NULL;
69 -  cwd->desc = open (".", O_SEARCH);
70 +  cwd->desc = open (".", 0);
71    if (!GNULIB_FCNTL_SAFER)
72      cwd->desc = fd_safer (cwd->desc);
73    if (cwd->desc < 0)