fix build on Solaris (bug #4476)
[asterisk/asterisk.git] / formats / format_au.c
index 8a3fdff..9329ac6 100755 (executable)
  * the GNU General Public License
  */
  
-#include <netinet/in.h>
-#include <arpa/inet.h>
 #include <stdlib.h>
 #include <sys/time.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
-#ifdef __linux__
-#include <endian.h>
-#else
-#include <machine/endian.h>
-#endif
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
 #include "asterisk/file.h"
 #include "asterisk/logger.h"
 #include "asterisk/sched.h"
 #include "asterisk/module.h"
+#include "asterisk/endian.h"
 
 #define BUF_SIZE               160
 
@@ -190,7 +189,7 @@ static struct ast_filestream *au_open(int fd)
        struct ast_filestream *tmp;
 
        if (!(tmp = malloc(sizeof(struct ast_filestream)))) {
-               ast_log(LOG_WARNING, "Out of memory\n");
+               ast_log(LOG_ERROR, "Out of memory\n");
                return NULL;
        }
 
@@ -222,7 +221,7 @@ static struct ast_filestream *au_rewrite(int fd, const char *comment)
        struct ast_filestream *tmp;
 
        if ((tmp = malloc(sizeof(struct ast_filestream))) == NULL) {
-               ast_log(LOG_WARNING, "Out of memory\n");
+               ast_log(LOG_ERROR, "Out of memory\n");
                return NULL;
        }