surpport seeking the recorded video
[vuplus_openembedded] / recipes / glibc / glibc-2.3.2 / ldconfig.patch
1 --- elf/ldconfig.c      2003-07-08 23:26:27.000000000 +0900
2 +++ elf/ldconfig.c.debian       2003-07-08 23:29:43.000000000 +0900
3 @@ -920,26 +920,24 @@
4  {
5    FILE *file = NULL;
6    char *line = NULL;
7 -  const char *canon;
8 +  const char *canon = filename;
9    size_t len = 0;
10 +  int file_fd;
11  
12    if (opt_chroot)
13      {
14        canon = chroot_canon (opt_chroot, filename);
15 -      if (canon)
16 -       file = fopen (canon, "r");
17 -      else
18 +      if (!canon)
19         canon = filename;
20      }
21 -  else
22 -    {
23 -      canon = filename;
24 -      file = fopen (filename, "r");
25 -    }
26 +
27 +  if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
28 +    file = fdopen (file_fd, "r");
29  
30    if (file == NULL)
31      {
32 -      error (0, errno, _("Can't open configuration file %s"), canon);
33 +      if (opt_verbose)
34 +       error (0, errno, _("Can't open configuration file %s"), canon);
35        if (canon != filename)
36         free ((char *) canon);
37        return;