Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 1 | From 4e5c5a245f248976ea55fe1f805badb0cb1bb072 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 30 Dec 2022 23:41:36 -0800 |
| 4 | Subject: [PATCH] Do not undefine _FILE_OFFSET_BITS |
| 5 | |
| 6 | This does not work when we want to use 64bit time_t in glibc |
| 7 | therefore let system decide on defining these macros |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | client/client_types.cpp | 9 --------- |
| 14 | client/hostinfo_unix.cpp | 9 --------- |
| 15 | 2 files changed, 18 deletions(-) |
| 16 | |
| 17 | diff --git a/client/client_types.cpp b/client/client_types.cpp |
| 18 | index 2977ef7863..7653517302 100644 |
| 19 | --- a/client/client_types.cpp |
| 20 | +++ b/client/client_types.cpp |
| 21 | @@ -22,15 +22,6 @@ |
| 22 | #include "zlib.h" |
| 23 | #else |
| 24 | #include "config.h" |
| 25 | -// Somehow having config.h define _FILE_OFFSET_BITS or _LARGE_FILES is |
| 26 | -// causing open to be redefined to open64 which somehow, in some versions |
| 27 | -// of zlib.h causes gzopen to be redefined as gzopen64 which subsequently gets |
| 28 | -// reported as a linker error. So for this file, we compile in small files |
| 29 | -// mode, regardless of these settings |
| 30 | -#undef _FILE_OFFSET_BITS |
| 31 | -#undef _LARGE_FILES |
| 32 | -#undef _LARGEFILE_SOURCE |
| 33 | -#undef _LARGEFILE64_SOURCE |
| 34 | #include <sys/stat.h> |
| 35 | #include <sys/types.h> |
| 36 | #include <zlib.h> |
| 37 | diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp |
| 38 | index ff0b596221..0ad6841b39 100644 |
| 39 | --- a/client/hostinfo_unix.cpp |
| 40 | +++ b/client/hostinfo_unix.cpp |
| 41 | @@ -26,15 +26,6 @@ |
| 42 | |
| 43 | #if !defined(_WIN32) || defined(__CYGWIN32__) |
| 44 | |
| 45 | -// Access to binary files in /proc filesystem doesn't work in the 64bit |
| 46 | -// files environment on some systems. |
| 47 | -// None of the functions here need 64bit file functions, |
| 48 | -// so undefine _FILE_OFFSET_BITS and _LARGE_FILES. |
| 49 | -// |
| 50 | -#undef _FILE_OFFSET_BITS |
| 51 | -#undef _LARGE_FILES |
| 52 | -#undef _LARGEFILE_SOURCE |
| 53 | -#undef _LARGEFILE64_SOURCE |
| 54 | #include <iostream> |
| 55 | #include <vector> |
| 56 | #include <string> |
| 57 | -- |
| 58 | 2.39.0 |
| 59 | |