Package: par2cmdline Version: 0.4-8 Severity: important Tags: patch Hi,
currently your package FTBFS on GNU/kFreeBSD with the following error: > g++ -DHAVE_CONFIG_H -I. -I. -I. -Wall -g -Wall -O2 -c -o diskfile.o > diskfile.cpp > diskfile.cpp: In static member function 'static u64 > DiskFile::GetFileSize(std::string)': > diskfile.cpp:821: error: 'BLKGETSIZE64' was not declared in this scope > make[2]: *** [diskfile.o] Error 1 Full build logs are available at <http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=par2cmdline>. Please find attached a patch to fix this, based on what I read in #264630 about BLKGETSIZE64 (Linux) and DIOCGMEDIASIZE (GNU/kFreeBSD): > ./linux/fs.h:#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size > in bytes (u64 *arg) */ > ./sys/disk.h:#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media > size in bytes */ I'm not certain but having size_t VS off_t sounds not too bad to mee. What's your mind about this patch? Cheers, -- Cyril Brulebois
--- par2cmdline-0.4/diskfile.cpp 2007-03-16 06:56:17.225694000 +0100 +++ par2cmdline-0.4/diskfile.cpp 2007-03-16 06:58:10.000000000 +0100 @@ -27,6 +27,11 @@ #endif #endif +#if defined(__FreeBSD_kernel__) +#include <sys/disk.h> +#define BLKGETSIZE64 DIOCGMEDIASIZE +#endif + #ifdef WIN32 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////