[libdvdnav-devel] [Git][videolan/libdvdread][master] Extra safety to be sure that off64_t is correctly defined

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Jul 4 17:40:19 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread


Commits:
b9188714 by Jean-Baptiste Kempf at 2026-07-04T11:26:30+02:00
Extra safety to be sure that off64_t is correctly defined

Orders of includes might be complex

- - - - -


2 changed files:

- src/dvdread/dvd_filesystem.h
- src/dvdread/dvd_reader.h


Changes:

=====================================
src/dvdread/dvd_filesystem.h
=====================================
@@ -34,8 +34,11 @@
 typedef SSIZE_T ssize_t;
 #endif
 typedef __int64 off64_t;
+#elif defined(__GLIBC__)
+/* sys/types.h may have been included before _LARGEFILE64_SOURCE was defined. */
+typedef __off64_t off64_t;
 #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
-/* off_t is already 64 bit here so off64_t is not provided */
+/* off_t is already 64 bit here so off64_t is not provided. */
 typedef off_t off64_t;
 #endif
 


=====================================
src/dvdread/dvd_reader.h
=====================================
@@ -23,6 +23,11 @@
 #ifndef LIBDVDREAD_DVD_READER_H
 #define LIBDVDREAD_DVD_READER_H
 
+/* dvd_filesystem.h exposes off64_t in the public filesystem callbacks. */
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
+
 #include <sys/types.h>
 #include <inttypes.h>
 #include <stdarg.h>



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/b91887146ca57fdd2ffa80ce8cb3ddb562618966

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/b91887146ca57fdd2ffa80ce8cb3ddb562618966
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