More fixes caused by Sun's complete inability to follow any standard
authorPierre Ossman <ossman@cendio.se>
Tue, 18 Apr 2006 14:09:56 +0000 (14:09 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 18 Apr 2006 14:09:56 +0000 (14:09 +0000)
whatsoever.

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@742 fefdeb5f-60dc-0310-8127-8f9354f1896f

configure.ac
src/modules/rtp/rtp.c
src/modules/rtp/sap.c

index 3fd32f8..4f9b882 100644 (file)
@@ -36,6 +36,16 @@ if type -p stow > /dev/null && test -d /usr/local/stow ; then
    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
 fi
 
+#### Platform hacks ####
+
+case $host in
+   *-*-solaris* )
+      AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+      AC_DEFINE(_XOPEN_SOURCE,          2, Needed to get declarations for msg_control and msg_controllen on Solaris)
+      AC_DEFINE(__EXTENSIONS__,         1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+      ;;
+esac
+
 #### Checks for programs. ####
 
 # CC
@@ -158,6 +168,9 @@ AC_CHECK_HEADERS([linux/input.h], [HAVE_EVDEV=1], [HAVE_EVDEV=0])
 
 AM_CONDITIONAL([HAVE_EVDEV], [test "x$HAVE_EVDEV" = "x1"])
 
+# Solaris
+AC_CHECK_HEADERS([sys/filio.h])
+
 # Windows
 AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h])
 
index ccd3b6c..23e84eb 100644 (file)
 #include <unistd.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
 #include <polypcore/log.h>
 
 #include "rtp.h"
@@ -74,7 +78,7 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) {
             size_t k = n + chunk.length > size ? size - n : chunk.length;
 
             if (chunk.memblock) {
-                iov[iov_idx].iov_base = (uint8_t*) chunk.memblock->data + chunk.index;
+                iov[iov_idx].iov_base = (void*)((uint8_t*) chunk.memblock->data + chunk.index);
                 iov[iov_idx].iov_len = k;
                 mb[iov_idx] = chunk.memblock;
                 iov_idx ++;
@@ -96,7 +100,7 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) {
                 header[1] = htonl(c->timestamp);
                 header[2] = htonl(c->ssrc);
 
-                iov[0].iov_base = header;
+                iov[0].iov_base = (void*)header;
                 iov[0].iov_len = sizeof(header);
                 
                 m.msg_name = NULL;
index 0c12322..d2bca04 100644 (file)
 #include <unistd.h>
 #include <sys/ioctl.h>
 
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
 #include <polypcore/util.h>
 #include <polypcore/log.h>
 #include <polypcore/xmalloc.h>