From 0232f398c7a4643cc3f3dc26e5717e05b28b0219 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 30 Mar 2006 01:35:26 +0000 Subject: [PATCH] fix sun studio compile issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@967 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/iax/src/iax.c | 4 ++++ libs/iax/src/iax2.h | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libs/iax/src/iax.c b/libs/iax/src/iax.c index fc59f4369a..607b1ed5f7 100644 --- a/libs/iax/src/iax.c +++ b/libs/iax/src/iax.c @@ -286,7 +286,11 @@ void iax_disable_debug(void) #ifdef WIN32 #define G __FILE__, __LINE__, #else +#ifdef __GNUC__ #define G __FILE__, __LINE__, __PRETTY_FUNCTION__, +#else +#define G __FILE__, __LINE__, __func__, +#endif #endif #define DEBU __debug diff --git a/libs/iax/src/iax2.h b/libs/iax/src/iax2.h index f2d18f903e..9fc89d8ae8 100644 --- a/libs/iax/src/iax2.h +++ b/libs/iax/src/iax2.h @@ -154,11 +154,16 @@ typedef long long time_in_ms_t; #define IAX_DPSTATUS_IGNOREPAT (1 << 14) #define IAX_DPSTATUS_MATCHMORE (1 << 15) -#if defined(_MSC_VER) +#if defined __GNUC__ +#define __PACKED __attribute__ ((__packed__)) +#else +#if defined (_MSC_VER) #pragma pack(push,1) #define __PACKED #else -#define __PACKED __attribute__ ((__packed__)) +#pragma pack(1) +#define __PACKED +#endif #endif /* Full frames are always delivered reliably */ @@ -218,8 +223,12 @@ struct ast_iax2_firmware_header { } __PACKED; -#if defined(_MSC_VER) +#ifdef _MSC_VER #pragma pack(pop) +#else +#ifndef __GNUC__ +#pragma pack() +#endif #endif #undef __PACKED