File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ macro(USE_COMPAT)
6161
6262 check_include_file("alloca.h" HAVE_ALLOCA_H)
6363
64+ check_include_file("byteswap.h" HAVE_BYTESWAP_H)
65+
6466 list (REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=200809L)
6567 list (REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
6668 list (REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D__BSD_VISIBLE=1)
Original file line number Diff line number Diff line change 2626# include <alloca.h>
2727#endif
2828
29- #if defined (__APPLE__ ) || defined (_WIN32 )
29+ #cmakedefine HAVE_BYTESWAP_H
30+ #ifdef HAVE_BYTESWAP_H
31+ # include <byteswap.h>
32+ #else
3033# define bswap_32 __builtin_bswap32
3134# define bswap64 __builtin_bswap64
32- #else
33- # include <byteswap.h>
3435#endif
3536
3637#include <limits.h>
You can’t perform that action at this time.
0 commit comments