Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libdvdread
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
libdvdread
Commits
9bc33de3
Commit
9bc33de3
authored
4 years ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
add checks for strerror_r
parent
32afabc1
No related branches found
Branches containing commit
No related tags found
1 merge request
!12
add checks for strerror_r
Pipeline
#14532
passed with stage
Stage:
in 1 minute and 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.ac
+3
-0
3 additions, 0 deletions
configure.ac
src/dvd_input.c
+15
-0
15 additions, 0 deletions
src/dvd_input.c
with
18 additions
and
0 deletions
configure.ac
+
3
−
0
View file @
9bc33de3
...
...
@@ -115,6 +115,9 @@ AS_IF([test "x$ac_cv_c_compiler_gnu" = "xyes"], [
AC_DEFINE([UNUSED], [], [Unused parameter annotation])
])
AC_FUNC_STRERROR_R
AS_IF([test "x$ac_cv_func_strerror_r" = "xyes"], [], [AC_CHECK_FUNCS([strerror_s])])
dnl export library version number
DVDREAD_VERSION_MAJOR=dvdread_major()
DVDREAD_VERSION_MINOR=dvdread_minor()
...
...
This diff is collapsed.
Click to expand it.
src/dvd_input.c
+
15
−
0
View file @
9bc33de3
...
...
@@ -200,8 +200,23 @@ static dvd_input_t file_open(void *priv, dvd_logger_cb *logcb,
#endif
if
(
dev
->
fd
<
0
)
{
char
buf
[
256
];
#if defined(HAVE_STRERROR_R) && defined(HAVE_DECL_STRERROR_R)
#ifdef STRERROR_R_CHAR_P
*
buf
=
0
;
if
(
strerror_r
(
errno
,
buf
,
256
)
==
NULL
)
*
buf
=
0
;
#else
if
(
strerror_r
(
errno
,
buf
,
256
)
!=
0
)
*
buf
=
0
;
#endif
#else
#if defined(HAVE_STRERR_S)
if
(
strerror_s
(
errno
,
buf
,
256
)
!=
0
)
*
buf
=
0
;
#else
*
buf
=
0
;
#endif
#endif
DVDReadLog
(
priv
,
logcb
,
DVD_LOGGER_LEVEL_ERROR
,
"Could not open input: %s"
,
buf
);
free
(
dev
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment