Skip to content

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

@ajacoutot

Description

@ajacoutot

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions