diff options
author | hpa <hpa> | 2005-01-04 01:43:48 +0000 |
---|---|---|
committer | hpa <hpa> | 2005-01-04 01:43:48 +0000 |
commit | 2e7cbed5827feec8ce30597d87fb4b1b4695fe4a (patch) | |
tree | f597ccdd3c14bbfdee3a01533772483f64b96195 /extlinux | |
parent | 5133e41f0d7e33ac4922880eb060d685224a5949 (diff) | |
download | syslinux-2e7cbed5827feec8ce30597d87fb4b1b4695fe4a.tar.gz |
If BLKGETSIZE64 isn't defined, define it.
Diffstat (limited to 'extlinux')
-rw-r--r-- | extlinux/extlinux.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extlinux/extlinux.c b/extlinux/extlinux.c index 13f1f346..d3fa8c7d 100644 --- a/extlinux/extlinux.c +++ b/extlinux/extlinux.c @@ -42,6 +42,11 @@ # define dprintf(...) ((void)0) #endif +#if defined(__linux__) && !defined(BLKGETSIZE64) +/* This takes a u64, but the size field says size_t. Someone screwed big. */ +# define BLKGETSIZE64 _IOR(0x12,114,size_t) +#endif + #define LDLINUX_MAGIC 0x3eb202fe enum bs_offsets { @@ -286,7 +291,6 @@ uint64_t get_size(int devfd) if ( !ioctl(devfd, BLKGETSIZE64, &bytes) ) return bytes; #endif - if ( !ioctl(devfd, BLKGETSIZE, §s) ) return (uint64_t)sects << 9; else if ( !fstat(devfd, &st) && st.st_size ) |