| Index: srtp/crypto/include/datatypes.h
|
| diff --git a/srtp/crypto/include/datatypes.h b/srtp/crypto/include/datatypes.h
|
| index 7993b5876602256e908521e5cb1b32f494ebc57f..c930cfb29383d27d2848978242a08802879c98cd 100644
|
| --- a/srtp/crypto/include/datatypes.h
|
| +++ b/srtp/crypto/include/datatypes.h
|
| @@ -70,7 +70,6 @@
|
| #endif
|
|
|
|
|
| -
|
| /* if DATATYPES_USE_MACROS is defined, then little functions are macros */
|
| #define DATATYPES_USE_MACROS
|
|
|
| @@ -99,6 +98,12 @@ typedef union {
|
| uint64_t v64[2];
|
| } v128_t;
|
|
|
| +typedef union {
|
| + uint8_t v8[32];
|
| + uint16_t v16[16];
|
| + uint32_t v32[8];
|
| + uint64_t v64[4];
|
| +} v256_t;
|
|
|
|
|
| /* some useful and simple math functions */
|
| @@ -384,7 +389,7 @@ void
|
| octet_string_set_to_zero(uint8_t *s, int len);
|
|
|
|
|
| -#ifndef SRTP_KERNEL_LINUX
|
| +#if !defined(SRTP_KERNEL_LINUX) //&& defined(HAVE_CONFIG_H)
|
|
|
| /*
|
| * Convert big endian integers to CPU byte order.
|
| @@ -402,7 +407,7 @@ octet_string_set_to_zero(uint8_t *s, int len);
|
|
|
| #if defined(__GNUC__) && defined(HAVE_X86)
|
| /* Fall back. */
|
| -static INLINE uint32_t be32_to_cpu(uint32_t v) {
|
| +static inline uint32_t be32_to_cpu(uint32_t v) {
|
| /* optimized for x86. */
|
| asm("bswap %0" : "=r" (v) : "0" (v));
|
| return v;
|
| @@ -416,7 +421,7 @@ static INLINE uint32_t be32_to_cpu(uint32_t v) {
|
| # define be32_to_cpu(x) ntohl((x))
|
| # endif /* HAVE_X86 */
|
|
|
| -static INLINE uint64_t be64_to_cpu(uint64_t v) {
|
| +static inline uint64_t be64_to_cpu(uint64_t v) {
|
| # ifdef NO_64BIT_MATH
|
| /* use the make64 functions to do 64-bit math */
|
| v = make64(htonl(low32(v)),htonl(high32(v)));
|
| @@ -510,4 +515,8 @@ bitvector_left_shift(bitvector_t *x, int index);
|
| char *
|
| bitvector_bit_string(bitvector_t *x, char* buf, int len);
|
|
|
| +#ifdef TESTAPP_SOURCE
|
| +int base64_string_to_octet_string(char *raw, int *pad, char *base64, int len);
|
| +#endif
|
| +
|
| #endif /* _DATATYPES_H */
|
|
|