Fix definition of BLKGETSIZE64 on FreeBSD

The matching ioctl is DIOCGMEDIASIZE.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Closes #10818
This commit is contained in:
Alexander Richardson 2020-08-28 00:09:26 +01:00 committed by GitHub
parent 735ba76104
commit 2b07c5aa3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -35,12 +35,8 @@
#include <string.h>
#include <stdlib.h>
/*
* Some old glibc headers don't define BLKGETSIZE64
* and we don't want to require the kernel headers
*/
#if !defined(BLKGETSIZE64)
#define BLKGETSIZE64 _IOR(0x12, 114, size_t)
#define BLKGETSIZE64 DIOCGMEDIASIZE
#endif
/*