blob: 1df318a5baa85a79ab8a98db8a6143766a911f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
From 271d855c0ad94a2ec164e20173257a06cd83288d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= <jezz@sysmic.org>
Date: Thu, 2 Jan 2014 16:00:06 +0100
Subject: [PATCH 2/3] don't enable largefile support unconditionally on uClibc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
uClibc can be compiled without largefile support (and errors out if
_FILE_OFFSET_BITS is set to 64), so don't define it if that combination
is detected.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
coregrind/m_initimg/initimg-linux.c | 4 ++++
coregrind/m_main.c | 4 ++++
coregrind/m_ume/elf.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
index 9bcc05c..ffee30f 100644
--- a/coregrind/m_initimg/initimg-linux.c
+++ b/coregrind/m_initimg/initimg-linux.c
@@ -55,7 +55,11 @@
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is for ELF types etc, and also the AT_ constants. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
diff --git a/coregrind/m_main.c b/coregrind/m_main.c
index 35c11e1..0372946 100644
--- a/coregrind/m_main.c
+++ b/coregrind/m_main.c
@@ -2997,7 +2997,11 @@ asm(
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is in order to get AT_NULL and AT_PAGESIZE. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
diff --git a/coregrind/m_ume/elf.c b/coregrind/m_ume/elf.c
index b5b30e5..0766c74 100644
--- a/coregrind/m_ume/elf.c
+++ b/coregrind/m_ume/elf.c
@@ -48,7 +48,11 @@
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is for ELF types etc, and also the AT_ constants. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
--
1.8.3.2
|