From 336f3b11e5b9f2823ffe669eb1c55f50f0c04ca4 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 6 Dec 2016 13:15:27 +0300 Subject: [PATCH] Fix _FILE_OFFSET_BITS redinition (solaris/autotools) So firstly include our header (config.h) -- , and only after it since latest has #ifdef guard, while our config.h is not inteded for this. And besides all this thing with LARGE_FILE is a abit awkward, since we don't nefine _LP64/_LP32 anyway, and so we have next error actually (64bit VS 32bit): ==> solaris: In file included from ./util-internal.h:30:0, ==> solaris: from test/regress_ssl.c:49: ==> solaris: ./evconfig-private.h:29:0: warning: "_FILE_OFFSET_BITS" redefined ==> solaris: #define _FILE_OFFSET_BITS 64 ==> solaris: ^ ==> solaris: In file included from /usr/include/sys/types.h:17:0, ==> solaris: from test/regress_ssl.c:38: ==> solaris: /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0: note: this is the location of the previous definition ==> solaris: #define _FILE_OFFSET_BITS 32 ==> solaris: ^ For cmake it commented in: 8b228e27f57300be61b57a41a2ec8666b726dc34 ("Lot's of cmake updates") --- test/regress_ssl.c | 3 ++- test/test-time.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/regress_ssl.c b/test/regress_ssl.c index 6452d270..2cec5a90 100644 --- a/test/regress_ssl.c +++ b/test/regress_ssl.c @@ -34,6 +34,8 @@ #include #endif +#include "util-internal.h" + #ifndef _WIN32 #include #include @@ -46,7 +48,6 @@ #include "event2/bufferevent_struct.h" #include "event2/buffer.h" #include "event2/listener.h" -#include "util-internal.h" #include "regress.h" #include "tinytest.h" diff --git a/test/test-time.c b/test/test-time.c index bcc7086d..c4d031e7 100644 --- a/test/test-time.c +++ b/test/test-time.c @@ -25,6 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "event2/event-config.h" +#include "util-internal.h" #include #include @@ -41,7 +42,6 @@ #include "event2/event.h" #include "event2/event_compat.h" #include "event2/event_struct.h" -#include "util-internal.h" int called = 0;