Commit e44ab316 authored by jan.koester's avatar jan.koester
Browse files

sys/types.h: loff_t with _GNU_SOURCE (as glibc)

mtd-utils uses it unguarded (flash_erase, nandwrite, libmtd).

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 3560b088
Loading
Loading
Loading
Loading
+7 −0
Changes for include/sys/types.h: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -88,3 +88,10 @@ extern "C" {
#define ino64_t ino_t
#define blkcnt64_t blkcnt_t
#endif

/* loff_t (llseek()/the MTD ioctls' offsets): glibc has it in <sys/types.h>
 * with _GNU_SOURCE (musl in <fcntl.h>). mtd-utils uses it unguarded. */
#if defined(_GNU_SOURCE) && !defined(__loff_t_defined)
#define __loff_t_defined
typedef off_t loff_t;
#endif