summaryrefslogtreecommitdiff
path: root/rbutil/ipodpatcher
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-07 20:06:48 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-12-07 20:06:48 +0000
commite23adb538652ae500ea33677b80bb8e14775eff8 (patch)
tree740bc33d811bc1bb5eb24ea8183c3ecb189a7852 /rbutil/ipodpatcher
parentf83a3d0ac4df41f588b395ea445a3f33c5cb136a (diff)
ipodpatcher: guard platform specific files.
Use the preprocessor to make platform specific files compile as empty files if built for a different platform. This removes the need to distinguish in the Makefile and simplifies creating a libipodpatcher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/ipodpatcher')
-rw-r--r--rbutil/ipodpatcher/ipodio-posix.c3
-rw-r--r--rbutil/ipodpatcher/ipodio-win32-scsi.c3
-rw-r--r--rbutil/ipodpatcher/ipodio-win32.c4
3 files changed, 10 insertions, 0 deletions
diff --git a/rbutil/ipodpatcher/ipodio-posix.c b/rbutil/ipodpatcher/ipodio-posix.c
index db8648e70e..8d43de2d60 100644
--- a/rbutil/ipodpatcher/ipodio-posix.c
+++ b/rbutil/ipodpatcher/ipodio-posix.c
@@ -19,6 +19,7 @@
*
****************************************************************************/
+#if !defined(_WIN32) /* all non-Windows platforms are considered POSIX. */
#include <stdio.h>
#include <unistd.h>
@@ -388,3 +389,5 @@ ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes)
return write(ipod->dh, buf, nbytes);
}
+#endif
+
diff --git a/rbutil/ipodpatcher/ipodio-win32-scsi.c b/rbutil/ipodpatcher/ipodio-win32-scsi.c
index c87be72de8..7e338acbc0 100644
--- a/rbutil/ipodpatcher/ipodio-win32-scsi.c
+++ b/rbutil/ipodpatcher/ipodio-win32-scsi.c
@@ -49,6 +49,7 @@
*
****************************************************************************/
+#if defined(_WIN32)
#include <windows.h>
#include <stddef.h>
#include <stdio.h>
@@ -119,3 +120,5 @@ int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code,
return -1;
}
}
+#endif
+
diff --git a/rbutil/ipodpatcher/ipodio-win32.c b/rbutil/ipodpatcher/ipodio-win32.c
index abf7bdf46e..27c1b24f01 100644
--- a/rbutil/ipodpatcher/ipodio-win32.c
+++ b/rbutil/ipodpatcher/ipodio-win32.c
@@ -25,6 +25,8 @@
*
****************************************************************************/
+#if defined(_WIN32)
+
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
@@ -201,3 +203,5 @@ ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes)
return count;
}
+#endif
+