Re: [Gptfdisk-general] compiling on openbsd
Brought to you by:
srs5694
From: Rod S. <rod...@ro...> - 2015-10-21 12:41:47
|
On 10/20/2015 11:25 PM, Joel Rees wrote: > Trying to compile gpt-fdisk on openbsd. I don't think I've ever tried compiling GPT fdisk on OpenBSD, and I don't recall hearing of anybody else doing it. That said.... > in guid.h, we have > --------------- > // Have to play games with uuid_t since it's defined in incompatible ways > // for Unix (libuuid) vs. Windows (in rpc.h) ... > However, in openbsd, in sys/uuid.h, we have ... > Extending the MSWindows hack to openbsd does allow compiling to > proceed a bit farther, > > ---------------- > $ make ... > g++ -O2 -pipe -Wall -D_FILE_OFFSET_BITS=64 -c diskio-unix.cc > diskio-unix.cc: In member function 'int DiskIO::DiskSync()': > diskio-unix.cc:222: warning: unused variable 'i' > diskio-unix.cc: In member function 'int DiskIO::Seek(uint64_t)': > diskio-unix.cc:285: error: 'lseek64' was not declared in this scope > *** Error 1 in /home/family/work/sf/gptfdisk-code (<sys.mk>:97 'diskio-unix.o') > ---------------- > > but it really wants some kind of compile-time check, or at least a > run-time check. It sounds like you've gotten past the initial uuid_t definition issue (although whether it will work in the compiled program is another matter). The lseek64 issue is entirely different. If you check support.h, you'll see that "lseek64" is redefined to "lseek" for some platforms that don't provide this call. You may work around this second issue by expanding the list to include OpenBSD. -- Rod Smith rod...@ro... http://www.rodsbooks.com |