Skip to content

Instantly share code, notes, and snippets.

@zao

zao/mingw.diff Secret

Last active January 7, 2016 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zao/48ce94141423e367de3d to your computer and use it in GitHub Desktop.
Save zao/48ce94141423e367de3d to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index 21b6b2e..a59f80d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
#Makefile by Ketor
-CC = gcc -D__USE_FILE_OFFSET64 -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -fno-strict-aliasing -fsigned-char -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -DPIC
-CPP = g++ -D__USE_FILE_OFFSET64 -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -fno-strict-aliasing -fsigned-char -Wno-invalid-offsetof -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -DPIC
+CC = gcc -D__USE_FILE_OFFSET64 -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-strict-aliasing -fsigned-char -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -DPIC
+CPP = g++ -D__USE_FILE_OFFSET64 -DHAVE_CONFIG_H -I. -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-strict-aliasing -fsigned-char -Wno-invalid-offsetof -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -DPIC
CEPH_INCLUDE = -I./ -I./global -I./mingw_include -I/c/Setup/boost_1_58_0/
CFLAGS = $(CEPH_INCLUDE)
diff --git a/include/byteorder.h b/include/byteorder.h
index 191d242..3866eaa 100644
--- a/include/byteorder.h
+++ b/include/byteorder.h
@@ -10,6 +10,10 @@
#include <sys/param.h>
#include "int_types.h"
+#if defined(_WIN32)
+# define CEPH_LITTLE_ENDIAN
+#endif
+
#if defined(__APPLE__)
# if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
# define CEPH_LITTLE_ENDIAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment