vmware / open-vmdk

Apache License 2.0
113 stars 46 forks source link

[openbsd] can't compile, no SEEK_DATA/SEEK_HOLE support #1

Open jirib opened 9 years ago

jirib commented 9 years ago

IIUC SEEK_DATA/SEEK_HOLE is not standardized yet, could you meanwhile make it portable to OpenBSD?

$ gmake
for x in vmdk ova; do gmake -C $x all; done
gmake[1]: Entering directory '/home/jirib/tmp/open-vmdk/vmdk'
mkdir -p ../build/vmdk
gcc -W -Wall -O2 -g -c -o ../build/vmdk/flat.o flat.c
flat.c: In function 'FlatNextData':
flat.c:85: error: 'SEEK_DATA' undeclared (first use in this function)
flat.c:85: error: (Each undeclared identifier is reported only once
flat.c:85: error: for each function it appears in.)
flat.c:99: error: 'SEEK_HOLE' undeclared (first use in this function)
Makefile:36: recipe for target '../build/vmdk/flat.o' failed
gmake[1]: *** [../build/vmdk/flat.o] Error 1
gmake[1]: Leaving directory '/home/jirib/tmp/open-vmdk/vmdk'
gmake[1]: Entering directory '/home/jirib/tmp/open-vmdk/ova'
gmake[1]: Nothing to be done for 'all'.
gmake[1]: Leaving directory '/home/jirib/tmp/open-vmdk/ova'

$ sysctl kern.version                                                                                                                                                         
kern.version=OpenBSD 5.8 (GENERIC.MP) #1234: Thu Aug  6 09:26:52 MDT 2015
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
jirib commented 9 years ago

man lseek - http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/lseek.2?query=lseek

jirib commented 9 years ago

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/unistd.h?rev=1.31&content-type=text/x-cvsweb-markup

oliverkurth commented 1 year ago

Sorry, I missed this issue. I'll have a look when I find some time.

If you have a patch, let me know. I never tested building this with OpenBSD.