Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | From 1eb0fa531301a5045af1b020fc093c4fcfd38680 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 14 Dec 2022 16:55:51 -0800 |
| 4 | Subject: [PATCH] Use off_t instead of off64_t |
| 5 | |
| 6 | Pass _FILE_OFFSET_BITS=64 to ensure 64bit off_t |
| 7 | |
| 8 | Upstream-Status: Submitted [https://github.com/rhboot/efivar/pull/237] |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | src/error.c | 2 +- |
| 12 | src/include/defaults.mk | 1 + |
| 13 | 2 files changed, 2 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/src/error.c b/src/error.c |
| 16 | index fcbba0d..9530e22 100644 |
| 17 | --- a/src/error.c |
| 18 | +++ b/src/error.c |
| 19 | @@ -191,7 +191,7 @@ dbglog_write(void *cookie, const char *buf, size_t size) |
| 20 | } |
| 21 | |
| 22 | static int |
| 23 | -dbglog_seek(void *cookie UNUSED, off64_t *offset, int whence) |
| 24 | +dbglog_seek(void *cookie UNUSED, off_t *offset, int whence) |
| 25 | { |
| 26 | FILE *log = efi_errlog ? efi_errlog : stderr; |
| 27 | int rc; |
| 28 | diff --git a/src/include/defaults.mk b/src/include/defaults.mk |
| 29 | index 632b155..95be8be 100644 |
| 30 | --- a/src/include/defaults.mk |
| 31 | +++ b/src/include/defaults.mk |
| 32 | @@ -34,6 +34,7 @@ CPPFLAGS ?= |
| 33 | override _CPPFLAGS := $(CPPFLAGS) |
| 34 | override CPPFLAGS = $(_CPPFLAGS) -DLIBEFIVAR_VERSION=$(VERSION) \ |
| 35 | -D_GNU_SOURCE \ |
| 36 | + -D_FILE_OFFSET_BITS=64 \ |
| 37 | -I$(TOPDIR)/src/include/ |
| 38 | CFLAGS ?= $(OPTIMIZE) $(DEBUGINFO) $(WARNINGS) $(ERRORS) |
| 39 | CFLAGS_GCC ?= -specs=$(TOPDIR)/src/include/gcc.specs \ |