#define COMPAT_H
#if defined(WIN32)
-#include <windows.h>
#include <ws2tcpip.h>
+#include <windows.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#define strdup(A) _strdup(A)
#define chroot(A) _chdir(A)
#define chdir(A) _chdir(A)
-#define alloca(A) _alloca(A)
#ifndef lseek
#define lseek(A,B,C) _lseek(A,B,C)
#endif
see http://www.khngai.com/emacs/tty.php */
#define TTY_FLUSH() if (!_isatty(_fileno(stdout))) fflush(stdout);
-/*
+
typedef UINT8 uint8_t;
typedef INT8 int8_t;
typedef UINT16 uint16_t;
typedef UINT64 uint64_t;
typedef INT64 int64_t;
typedef int socklen_t;
-*/
#else /* Not Win32 */
#include <assert.h>
#include "logger.h"
+#include "compat.h"
void
logger_init(logger_t *logger)
}
if (stream_fd != -1 && FD_ISSET(stream_fd, &rfds)) {
unsigned int rtplen=0;
- char type;
const void *audiobuf;
int audiobuflen;
}
/* Packet is valid, process it */
- type = packet[4+1] & ~0x80;
ret = raop_buffer_queue(raop_rtp->buffer, packet+4, rtplen, 0);
assert(ret >= 0);
#include <stdio.h>
#include <unistd.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include "dnssd.h"
#include "raop.h"
dnssd = dnssd_init(hwaddr, sizeof(hwaddr), NULL);
dnssd_register_raop(dnssd, name, raop_port);
+#ifndef WIN32
sleep(100);
+#else
+ Sleep(100*1000);
+#endif
dnssd_unregister_raop(dnssd);
dnssd_destroy(dnssd);