Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unbreak on BSD where the major() function is defined #577

Closed
ajacoutot opened this issue Oct 23, 2017 · 6 comments
Closed

unbreak on BSD where the major() function is defined #577

ajacoutot opened this issue Oct 23, 2017 · 6 comments

Comments

@ajacoutot
Copy link

Hi.

The commit deed4a4 broke building harfbuzz on BSD systems.

In file included from hb-set.cc:27: ./hb-set-private.hh:466:16: error: expected ')' unsigned int major (hb_codepoint_t g) const { return g / PAGE_SIZE; }

It's probably due to the fact that we have major(3) defined in sys/types.h.
See https://linux.die.net/man/3/major and https://man.openbsd.org/major
Fix is easy, let's just rename major into something less common. I didn't open a pull request because I'll leave it up to you to decide on the naming :-)
Thanks!

@ebraminio
Copy link
Collaborator

@ajacoutot, feel free to send a pull request for this also but other than that, is there any free CI service, like TravisCI/CircleCI/Jenkins for Linux/macOS or AppVeyor for Windows (or some in house you might have?) so we can test harfbuzz against freebsd also?

@ebraminio
Copy link
Collaborator

Our best bet is using a complicated qemu based solution it seems, 1, 2, 3.

@behdad
Copy link
Member

behdad commented Oct 23, 2017

Thanks for the report. I'll rename.

@behdad behdad closed this as completed in dd33e4e Oct 23, 2017
@ajacoutot
Copy link
Author

@ebraminio unfortunately I am not aware of any CI SaaS offering for BSD systems :-/
@behdad awesome, thanks for fixing!
Cheers guys.

@ebraminio ebraminio mentioned this issue Oct 29, 2017
4 tasks
@ebraminio
Copy link
Collaborator

ebraminio commented Nov 1, 2017

@ajacoutot, hi there, #595 adds freebsd9 cross-build. I hope it can help preventing issues like this in future, I guess you can suggest the solution to other projects also. It uses freebsd9 with gcc4, was "major" also defined there?

@ajacoutot
Copy link
Author

@ebraminio , hey ! Yes, major was also defined in FreeBSD. I believe it exists on all BSD :-)
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants