summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-12-15 00:09:48 +0000
committerDave Chapman <dave@dchapman.com>2006-12-15 00:09:48 +0000
commit49e016c48fe58ee50cd2f1dbb95bad420dd6c50e (patch)
treec08c40d0783b6c9d9a6c1a2e984f499aa2641824
parente21e87a2d0f1d915be0793f4ba34483ae4fd2231 (diff)
downloadrockbox-49e016c48fe58ee50cd2f1dbb95bad420dd6c50e.tar.gz
rockbox-49e016c48fe58ee50cd2f1dbb95bad420dd6c50e.zip
Reorganise the ioctl() #ifdefs - this should fix ipodpatcher for BSD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11768 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--tools/ipodpatcher/ipodio-posix.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/ipodpatcher/ipodio-posix.c b/tools/ipodpatcher/ipodio-posix.c
index 4b55d62629..7035bf2322 100644
--- a/tools/ipodpatcher/ipodio-posix.c
+++ b/tools/ipodpatcher/ipodio-posix.c
@@ -25,18 +25,17 @@
25#include <sys/types.h> 25#include <sys/types.h>
26#include <sys/stat.h> 26#include <sys/stat.h>
27#include <sys/ioctl.h> 27#include <sys/ioctl.h>
28#include <sys/mount.h>
29#if defined(__APPLE__) && defined(__MACH__)
30#include <sys/disk.h>
31#endif
32 28
33#if defined(linux) || defined (__linux) 29#if defined(linux) || defined (__linux)
34 #define IPOD_SECTORSIZE_IOCTL BLKSSZGET 30#include <sys/mount.h>
31#define IPOD_SECTORSIZE_IOCTL BLKSSZGET
35#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \ 32#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) \
36 || defined(__bsdi__) || defined(__DragonFly__) 33 || defined(__bsdi__) || defined(__DragonFly__)
37 #define IPOD_SECTORSIZE_IOCTL DIOCGSECTORSIZE 34#include <sys/disk.h>
35#define IPOD_SECTORSIZE_IOCTL DIOCGSECTORSIZE
38#elif defined(__APPLE__) && defined(__MACH__) 36#elif defined(__APPLE__) && defined(__MACH__)
39 #define IPOD_SECTORSIZE_IOCTL DKIOCGETBLOCKSIZE 37#include <sys/disk.h>
38#define IPOD_SECTORSIZE_IOCTL DKIOCGETBLOCKSIZE
40#else 39#else
41 #error No sector-size detection implemented for this platform 40 #error No sector-size detection implemented for this platform
42#endif 41#endif