[libdvdnav-devel] [Git][videolan/libdvdread][master] 2 commits: Revert "meson: remove sys/param.h check"
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Wed Dec 2 18:55:01 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread
Commits:
66fcd7b8 by Bernd Kuhls at 2026-12-02T19:52:56+01:00
Revert "meson: remove sys/param.h check"
This reverts commit 337c1519ed6ecdd123b07c56d0aceda169b6ae61.
- - - - -
7055e82e by Bernd Kuhls at 2026-12-02T19:52:56+01:00
Fixed compilation problems with PATH_MAX
../src/dvd_reader.c: In function 'dir_has_file':
../src/dvd_reader.c:393:14: error: 'PATH_MAX' undeclared (first use in this function)
393 | char path[ PATH_MAX + 1 ];
The build error was introduced by
https://code.videolan.org/videolan/libdvdread/-/commit/da7d7ed4e8fe08c0af310925995b2f4742f7eabf
and was found using the buildroot Gitlab pipelines with gcc 9.3.0.
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
- - - - -
2 changed files:
- meson.build
- src/dvd_reader.c
Changes:
=====================================
meson.build
=====================================
@@ -47,6 +47,18 @@ if host_machine.system() == 'windows'
'-D_CRT_SECURE_NO_WARNINGS']
endif
+# Header checks
+
+check_headers = [
+ 'sys/param.h',
+]
+
+foreach h : check_headers
+ if cc.has_header(h, args: test_args)
+ cdata.set('HAVE_' + h.underscorify().to_upper(), 1)
+ endif
+endforeach
+
cdata.set('UNUSED', cc.has_function_attribute('unused') ? '__attribute__((unused))' : '')
if host_machine.endian() == 'big'
=====================================
src/dvd_reader.c
=====================================
@@ -29,6 +29,11 @@
#include <limits.h> /* PATH_MAX */
#include <ctype.h> /* isalpha */
+#include <config.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h> /* PATH_MAX */
+#endif
+
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__APPLE__)
# define SYS_BSD 1
#endif
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/bd6670b16281b251326cedc82b438a77d43bcbae...7055e82edce2a3dbe7f3403259b6c7886d555f12
--
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/bd6670b16281b251326cedc82b438a77d43bcbae...7055e82edce2a3dbe7f3403259b6c7886d555f12
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the libdvdnav-devel
mailing list