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

gfunc.c: fix build error on macOS #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrew-d
Copy link

On macOS Monterey (12.0.1) on a M1 Mac, I'm seeing this build failure:

gfunc.c:296:24: error: format specifies type 'intmax_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
                        fprintf(out, "%jd", e->f_size);
                                      ~~~   ^~~~~~~~~
                                      %lld
gfunc.c:300:23: error: format specifies type 'intmax_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
                fprintf(out, "%jd", e->f_size);
                              ~~~   ^~~~~~~~~
                              %lld

I think this is a macOS toolchain bug(?) - off_t should never be larger than intmax_t - but it's easy enough to work around this with some configure-time checks.

@dmitris
Copy link

dmitris commented Aug 3, 2022

I hit the same issue trying to compile on a Mac.

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

Successfully merging this pull request may close these issues.

2 participants