mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
FS-3747 --resolve
This commit is contained in:
parent
a0a77f8cc6
commit
acdacfc6c0
@ -44,14 +44,41 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <util.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#else
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
#if defined(HAVE_BYTESWAP_H)
|
||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
|
#elif defined(USE_SYS_ENDIAN_H)
|
||||||
|
#include <sys/endian.h>
|
||||||
|
#elif defined (__APPLE__)
|
||||||
|
#include <libkern/OSByteOrder.h>
|
||||||
|
#define bswap_16 OSSwapInt16
|
||||||
|
#define bswap_32 OSSwapInt32
|
||||||
|
#define bswap_64 OSSwapInt64
|
||||||
|
#else
|
||||||
|
#define bswap_16(value) \
|
||||||
|
((((value) & 0xff) << 8) | ((value) >> 8))
|
||||||
|
|
||||||
|
#define bswap_32(value) \
|
||||||
|
(((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
|
||||||
|
(uint32_t)bswap_16((uint16_t)((value) >> 16)))
|
||||||
|
|
||||||
|
#define bswap_64(value) \
|
||||||
|
(((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \
|
||||||
|
<< 32) | \
|
||||||
|
(uint64_t)bswap_32((uint32_t)((value) >> 32)))
|
||||||
|
#endif
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user