tlsdate icon indicating copy to clipboard operation
tlsdate copied to clipboard

Fix configure and build errors on OS X

Open clemensg opened this issue 10 years ago • 8 comments

Hi,

On OS X 10.10 I can only find readv and writev but not preadv or pwritev, so I substituted preadv with lseek+readv if preadv is not available, and did the same for pwritev. I also removed a seemingly redundant autoconf check for clock_gettime, which broke the OS X configuration. The same check already exists in the case statements for platforms, which need clock_gettime.

I tested my changes on OS X 10.10 (Yosemite) and Debian Wheezy (make check tests passed). I hope I did not break the build on any other platform.

If there is a better way to fix the build errors on OS X, please comment and I will update the PR. Thanks.

Regards, Clemens

clemensg avatar Oct 26 '14 15:10 clemensg

Any thoughts?

clemensg avatar Dec 22 '14 16:12 clemensg

I'm wondering why preadv and pwritev are used in the first place? It looks that the code would be much simpler and more portable with pread and pwrite.

PiotrSikora avatar Dec 23 '14 23:12 PiotrSikora

Yes, I think so too. I changed the PR!

clemensg avatar Dec 27 '14 16:12 clemensg

How does this impact other OS X builds? Could you please report on any other impacted platforms as well?

ioerror avatar Jan 05 '15 12:01 ioerror

On OS X 10.11.2 (15C50) tlsdate 0.0.13 doesn’t build without this patch.

bfontaine avatar Dec 10 '15 13:12 bfontaine

your change is not equivalent -- it's changing the file offset when you use lseek. please change the code to use pread/pwrite instead.

you should also split the commits up -- one to change the configure script and one to update the pread/pwrite logic

vapier avatar Dec 10 '15 15:12 vapier

Hi, sorry for the delay, I totally forgot about this PR.

@vapier , you are right. I modified the patch to use pread and pwrite and split up the commit.

@ioerror , I can only test ArchLinux, OS X 10.10 and OS X 10.11 but nothing older than that. Maybe someone else has an older OS X machine to test it with?

clemensg avatar Dec 10 '15 15:12 clemensg

@ioerror @clemensg ping on this PR

ilovezfs avatar Apr 28 '17 16:04 ilovezfs