diff options
author | Maarten Bosmans <mkbosmans@gmail.com> | 2011-01-06 00:51:33 +0100 |
---|---|---|
committer | Maarten Bosmans <mkbosmans@gmail.com> | 2011-02-17 11:58:22 +0100 |
commit | bb12ff83564d43566089dd979639c6993ba76665 (patch) | |
tree | 1d7df88762eeba464971742328b7617ffb93f3b3 /src/modules | |
parent | 0ac0479534d9cb6e4ef734eeb3a663f33a4f8ef3 (diff) |
Apply #ifdefs around functionality not available on win32
And also the reverse: around some win32 specific functionality
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/module-augment-properties.c | 2 | ||||
-rw-r--r-- | src/modules/module-cli.c | 6 | ||||
-rw-r--r-- | src/modules/module-esound-sink.c | 9 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c index 30df69d8..bdeee291 100644 --- a/src/modules/module-augment-properties.c +++ b/src/modules/module-augment-properties.c @@ -180,6 +180,7 @@ static void update_rule(struct rule *r) { DIR *desktopfiles_dir; struct dirent *dir; +#ifdef DT_DIR /* Let's try a more aggressive search, but only one level */ if ((desktopfiles_dir = opendir(DESKTOPFILEDIR))) { while ((dir = readdir(desktopfiles_dir))) { @@ -200,6 +201,7 @@ static void update_rule(struct rule *r) { } closedir(desktopfiles_dir); } +#endif } if (!found) { r->good = FALSE; diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c index c5ff4564..90ce3b63 100644 --- a/src/modules/module-cli.c +++ b/src/modules/module-cli.c @@ -105,10 +105,14 @@ int pa__init(pa_module*m) { * of log messages, particularly because if stdout and stderr are * dup'ed they share the same O_NDELAY, too. */ +#ifndef OS_IS_WIN32 if ((fd = pa_open_cloexec("/dev/tty", O_RDWR|O_NONBLOCK, 0)) >= 0) { io = pa_iochannel_new(m->core->mainloop, fd, fd); pa_log_debug("Managed to open /dev/tty."); - } else { + } + else +#endif + { io = pa_iochannel_new(m->core->mainloop, STDIN_FILENO, STDOUT_FILENO); pa_iochannel_set_noclose(io, TRUE); pa_log_debug("Failed to open /dev/tty, using stdin/stdout fds instead."); diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c index 9eba8ac3..5a1391d7 100644 --- a/src/modules/module-esound-sink.c +++ b/src/modules/module-esound-sink.c @@ -31,9 +31,18 @@ #include <fcntl.h> #include <unistd.h> #include <limits.h> + +#ifdef HAVE_NETINET_IN_H #include <netinet/in.h> +#endif + +#ifdef HAVE_NETINET_TCP_H #include <netinet/tcp.h> +#endif + +#ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> +#endif #ifdef HAVE_LINUX_SOCKIOS_H #include <linux/sockios.h> |