summaryrefslogtreecommitdiffstats
path: root/package/mongoose/mongoose-0001-largefile-conditional-define.patch
blob: b1d759afdb1cf49b44d05939c0bf8bff41b90c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Avoid the following warning, due to duplicate definition of
"_LARGEFILE_SOURCE"

mongoose.c:52:0: warning: "_LARGEFILE_SOURCE" redefined [enabled by default]
 #define _LARGEFILE_SOURCE       // Enable fseeko() and ftello() functions
 ^
<command-line>:0:0: note: this is the location of the previous definition

Signed-off-by: Davide Viti <zinosat@tiscali.it>

--- mongoose-5.4/mongoose.c~	2014-07-28 13:19:00.000000000 +0200
+++ mongoose-5.4/mongoose.c	2014-08-04 23:10:59.164092500 +0200
@@ -49,7 +49,9 @@
 #define _XOPEN_SOURCE 600       // For flockfile() on Linux
 #define __STDC_FORMAT_MACROS    // <inttypes.h> wants this for C++
 #define __STDC_LIMIT_MACROS     // C++ wants that for INT64_MAX
+#ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE       // Enable fseeko() and ftello() functions
+#endif
 #define _FILE_OFFSET_BITS 64    // Enable 64-bit file offsets
 
 #ifdef _MSC_VER
OpenPOWER on IntegriCloud