projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d375593
)
Allow compilation on systems without BLKGETSIZE64
author
hpa
<hpa>
Mon, 3 Jan 2005 13:26:29 +0000
(13:26 +0000)
committer
hpa
<hpa>
Mon, 3 Jan 2005 13:26:29 +0000
(13:26 +0000)
extlinux/extlinux.c
patch
|
blob
|
history
diff --git
a/extlinux/extlinux.c
b/extlinux/extlinux.c
index
34c00f8
..
13f1f34
100644
(file)
--- a/
extlinux/extlinux.c
+++ b/
extlinux/extlinux.c
@@
-282,9
+282,12
@@
uint64_t get_size(int devfd)
uint32_t sects;
struct stat st;
+#ifdef BLKGETSIZE64
if ( !ioctl(devfd, BLKGETSIZE64, &bytes) )
return bytes;
- else if ( !ioctl(devfd, BLKGETSIZE, §s) )
+#endif
+
+ if ( !ioctl(devfd, BLKGETSIZE, §s) )
return (uint64_t)sects << 9;
else if ( !fstat(devfd, &st) && st.st_size )
return st.st_size;