Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
2c54f289
Commit
2c54f289
authored
Apr 10, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fdopendir does not imply openat (fix #3505)
parent
9e8bf209
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
configure.ac
configure.ac
+1
-1
modules/access/directory.c
modules/access/directory.c
+5
-5
modules/access/file.c
modules/access/file.c
+0
-2
src/text/filesystem.c
src/text/filesystem.c
+1
-1
No files found.
configure.ac
View file @
2c54f289
...
...
@@ -548,7 +548,7 @@ dnl Check for system libs needed
need_libc=false
dnl Check for usual libc functions
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fork getenv getpwuid_r gettimeofday isatty lstat memalign posix_fadvise posix_madvise posix_memalign putenv setenv setlocale stricmp strnicmp tdestroy uselocale])
AC_CHECK_FUNCS([ctime_r daemon fcntl fdopendir fork getenv getpwuid_r gettimeofday isatty lstat memalign
openat
posix_fadvise posix_madvise posix_memalign putenv setenv setlocale stricmp strnicmp tdestroy uselocale])
AC_REPLACE_FUNCS([asprintf atof atoll getcwd getdelim getpid gmtime_r lldiv localtime_r nrand48 rewind strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab vasprintf])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
...
...
modules/access/directory.c
View file @
2c54f289
...
...
@@ -76,7 +76,7 @@ struct directory_t
#ifndef WIN32
struct
stat
st
;
#endif
#ifndef HAVE_
FDOPENDIR
#ifndef HAVE_
OPENAT
char
*
path
;
#endif
};
...
...
@@ -175,7 +175,7 @@ void DirClose( vlc_object_t * p_this )
p_sys
->
current
=
current
->
parent
;
closedir
(
current
->
handle
);
free
(
current
->
uri
);
#ifndef HAVE_
FDOPENDIR
#ifndef HAVE_
OPENAT
free
(
current
->
path
);
#endif
free
(
current
);
...
...
@@ -237,7 +237,7 @@ block_t *DirBlock (access_t *p_access)
}
current
->
parent
=
NULL
;
current
->
handle
=
p_sys
->
handle
;
#ifndef HAVE_
FDOPENDIR
#ifndef HAVE_
OPENAT
current
->
path
=
strdup
(
p_access
->
psz_path
);
#endif
current
->
uri
=
p_sys
->
uri
;
...
...
@@ -260,7 +260,7 @@ block_t *DirBlock (access_t *p_access)
closedir
(
current
->
handle
);
p_sys
->
current
=
current
->
parent
;
free
(
current
->
uri
);
#ifndef HAVE_
FDOPENDIR
#ifndef HAVE_
OPENAT
free
(
current
->
path
);
#endif
free
(
current
);
...
...
@@ -315,7 +315,7 @@ block_t *DirBlock (access_t *p_access)
}
DIR
*
handle
;
#ifdef HAVE_
FDOPENDIR
#ifdef HAVE_
OPENAT
int
fd
=
vlc_openat
(
dirfd
(
current
->
handle
),
entry
,
O_RDONLY
);
if
(
fd
!=
-
1
)
{
...
...
modules/access/file.c
View file @
2c54f289
...
...
@@ -145,7 +145,6 @@ int Open( vlc_object_t *p_this )
if
(
*
end
==
'\0'
)
fd
=
vlc_dup
(
oldfd
);
#ifdef HAVE_FDOPENDIR
else
if
(
*
end
==
'/'
&&
end
>
path
)
{
char
*
name
=
decode_URI_duplicate
(
end
-
1
);
...
...
@@ -156,7 +155,6 @@ int Open( vlc_object_t *p_this )
free
(
name
);
}
}
#endif
}
else
{
...
...
src/text/filesystem.c
View file @
2c54f289
...
...
@@ -225,7 +225,7 @@ int vlc_openat (int dir, const char *filename, int flags, ...)
return
-
1
;
}
#ifdef HAVE_
FDOPENDIR
#ifdef HAVE_
OPENAT
int
fd
=
openat
(
dir
,
local_name
,
flags
,
mode
);
# ifdef HAVE_FCNTL
if
(
fd
!=
-
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment