]> granicus.if.org Git - libevent/commitdiff
Fix _FILE_OFFSET_BITS redinition (solaris/autotools)
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 6 Dec 2016 10:15:27 +0000 (13:15 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 6 Dec 2016 10:21:28 +0000 (13:21 +0300)
So firstly include our header (config.h) -- <evconfig-private.h>, and
only after it <sys/types.h> 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
test/test-time.c

index 6452d2705c45a053b5e2833cc0b5af0fd49a7cc1..2cec5a902bef1fb15958d923c04caad9858fd1e9 100644 (file)
@@ -34,6 +34,8 @@
 #include <windows.h>
 #endif
 
+#include "util-internal.h"
+
 #ifndef _WIN32
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -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"
index bcc7086df7eda470b47d641715926416bf46576d..c4d031e72d6248548890ab74254dc5d864286223 100644 (file)
@@ -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 <sys/types.h>
 #include <sys/stat.h>
@@ -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;