Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
9ab620e7
Commit
9ab620e7
authored
Oct 14, 2011
by
KO Myung-Hun
Committed by
Rémi Denis-Courmont
Oct 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vlc_readdir() for OS/2
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
e2557f56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/posix/filesystem.c
src/posix/filesystem.c
+8
-0
No files found.
src/posix/filesystem.c
View file @
9ab620e7
...
...
@@ -191,6 +191,7 @@ char *vlc_readdir( DIR *dir )
char
*
path
=
NULL
;
long
len
=
fpathconf
(
dirfd
(
dir
),
_PC_NAME_MAX
);
#if !defined(__OS2__) || !defined(__INNOTEK_LIBC__)
#ifdef NAME_MAX
/* POSIX says there shall we room for NAME_MAX bytes at all times */
if
(
/*len == -1 ||*/
len
<
NAME_MAX
)
...
...
@@ -201,6 +202,13 @@ char *vlc_readdir( DIR *dir )
return
NULL
;
#endif
len
+=
offsetof
(
struct
dirent
,
d_name
)
+
1
;
#else
/* __OS2__ && __INNOTEK_LIBC__ */
/* In the implementation of Innotek LIBC, aka kLIBC on OS/2,
* fpathconf (_PC_NAME_MAX) is broken, and d_name is not the last member
* of struct dirent.
* So just allocate as many as the size of struct dirent. */
len
=
sizeof
(
struct
dirent
);
#endif
struct
dirent
*
buf
=
malloc
(
len
);
if
(
unlikely
(
buf
==
NULL
))
...
...
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