diff options
-rw-r--r-- | include/gsm/endian.h | 15 | ||||
-rw-r--r-- | lib/demapping/get_bcch_or_ccch_bursts_impl.cc | 1 | ||||
-rw-r--r-- | lib/demapping/universal_ctrl_chans_demapper_impl.cc | 1 | ||||
-rw-r--r-- | lib/receiver/receiver_impl.cc | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/include/gsm/endian.h b/include/gsm/endian.h new file mode 100644 index 0000000..c176a49 --- /dev/null +++ b/include/gsm/endian.h @@ -0,0 +1,15 @@ +#ifndef GSM_ENDIAN_H +#define GSM_ENDIAN_H + +#if defined(__linux__) +# include <endian.h> +#elif defined(__APPLE__) +# include <libkern/OSByteOrder.h> + +# define htobe16(x) OSSwapHostToBigInt16(x) +# define htobe32(x) OSSwapHostToBigInt32(x) + +# define be32toh(x) OSSwapBigToHostInt32(x) +#endif + +#endif /* GSM_ENDIAN_H */ diff --git a/lib/demapping/get_bcch_or_ccch_bursts_impl.cc b/lib/demapping/get_bcch_or_ccch_bursts_impl.cc index 78d4280..f481294 100644 --- a/lib/demapping/get_bcch_or_ccch_bursts_impl.cc +++ b/lib/demapping/get_bcch_or_ccch_bursts_impl.cc @@ -23,6 +23,7 @@ #endif #include <gnuradio/io_signature.h> +#include <gsm/endian.h> #include <gsm/gsmtap.h> #include "get_bcch_or_ccch_bursts_impl.h" diff --git a/lib/demapping/universal_ctrl_chans_demapper_impl.cc b/lib/demapping/universal_ctrl_chans_demapper_impl.cc index 75fa6f7..5c83598 100644 --- a/lib/demapping/universal_ctrl_chans_demapper_impl.cc +++ b/lib/demapping/universal_ctrl_chans_demapper_impl.cc @@ -24,6 +24,7 @@ #include <gnuradio/io_signature.h> #include "universal_ctrl_chans_demapper_impl.h" +#include <gsm/endian.h> #include <gsm/gsmtap.h> namespace gr { diff --git a/lib/receiver/receiver_impl.cc b/lib/receiver/receiver_impl.cc index a31721d..25dc994 100644 --- a/lib/receiver/receiver_impl.cc +++ b/lib/receiver/receiver_impl.cc @@ -38,6 +38,7 @@ #include <iomanip> #include <assert.h> #include <boost/scoped_ptr.hpp> +#include <gsm/endian.h> //files included for debuging //#include "plotting/plotting.hpp" |