mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-21 12:30:41 +00:00
Minor fix for building under dev mode when byteswapping macro header files are not available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -110,19 +110,19 @@ static char version_id[16] = "P002F202";
|
|||||||
#define htolel(x) (x)
|
#define htolel(x) (x)
|
||||||
#define htoles(x) (x)
|
#define htoles(x) (x)
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_BYTESWAP_H
|
#if defined(HAVE_BYTESWAP_H)
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#define letohl(x) bswap_32(x)
|
#define letohl(x) bswap_32(x)
|
||||||
#define letohs(x) bswap_16(x)
|
#define letohs(x) bswap_16(x)
|
||||||
#define htolel(x) bswap_32(x)
|
#define htolel(x) bswap_32(x)
|
||||||
#define htoles(x) bswap_16(x)
|
#define htoles(x) bswap_16(x)
|
||||||
#elif HAVE_SYS_ENDIAN_SWAP16
|
#elif defined(HAVE_SYS_ENDIAN_SWAP16)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#define letohl(x) __swap32(x)
|
#define letohl(x) __swap32(x)
|
||||||
#define letohs(x) __swap16(x)
|
#define letohs(x) __swap16(x)
|
||||||
#define htolel(x) __swap32(x)
|
#define htolel(x) __swap32(x)
|
||||||
#define htoles(x) __swap16(x)
|
#define htoles(x) __swap16(x)
|
||||||
#elif HAVE_SYS_ENDIAN_BSWAP16
|
#elif defined(HAVE_SYS_ENDIAN_BSWAP16)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#define letohl(x) bswap32(x)
|
#define letohl(x) bswap32(x)
|
||||||
#define letohs(x) bswap16(x)
|
#define letohs(x) bswap16(x)
|
||||||
|
Reference in New Issue
Block a user