diff options
author | Samuel Thibault | 2008-04-22 03:11:48 +0200 |
---|---|---|
committer | Karel Zak | 2008-07-24 00:52:52 +0200 |
commit | ca04a95a3b4ccc943dc3ba05fc0b885f74ba5645 (patch) | |
tree | d96b82c87dc7cbf6770a6c0586ba47d5db9376b5 /fdisk/sfdisk.c | |
parent | mkswap: non-linux support (diff) | |
download | kernel-qcow2-util-linux-ca04a95a3b4ccc943dc3ba05fc0b885f74ba5645.tar.gz kernel-qcow2-util-linux-ca04a95a3b4ccc943dc3ba05fc0b885f74ba5645.tar.xz kernel-qcow2-util-linux-ca04a95a3b4ccc943dc3ba05fc0b885f74ba5645.zip |
fdisk: don't use get_linux_version() for non-linux
The get_linux_version() function is Linux-specific.
Work around it in a few places.
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/sfdisk.c')
-rw-r--r-- | fdisk/sfdisk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index a3b66174f..d737d69d1 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -1508,7 +1508,10 @@ msdos_partition(char *dev, int fd, unsigned long start, struct disk_desc *z) { struct sector *s; struct part_desc *partitions = &(z->partitions[0]); int pno = z->partno; - int bsd_later = (get_linux_version() >= KERNEL_VERSION(2,3,40)); + int bsd_later = 1; +#ifdef __linux__ + bsd_later = (get_linux_version() >= KERNEL_VERSION(2,3,40)); +#endif if (!(s = get_sector(dev, fd, start))) return 0; |