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

Fails to build on Mac #500

Open
jenstroeger opened this issue Sep 10, 2022 · 0 comments
Open

Fails to build on Mac #500

jenstroeger opened this issue Sep 10, 2022 · 0 comments

Comments

@jenstroeger
Copy link

Today I wanted to build i3status from source because it doesn’t seem to be available from MacPorts (whereas i3 is, albeit not maintained).

So, following the instructions got me a few warnings and then

FAILED: i3status.p/src_print_disk_info.c.o 
cc -Ii3status.p -I. -I.. -I../include -I/opt/local/include -I/opt/local/include/yajl -fcolor-diagnostics -Wall -Winvalid-pch -std=c11 -O0 -g -Wunused-value -D_GNU_SOURCE -D_REENTRANT -MD -MQ i3status.p/src_print_disk_info.c.o -MF i3status.p/src_print_disk_info.c.o.d -o i3status.p/src_print_disk_info.c.o -c ../src/print_disk_info.c
../src/print_disk_info.c:138:16: error: use of undeclared identifier 'path'
    if (statfs(path, &buf) == -1)
               ^
1 error generated.

and it seems the __APPLE__ code is the culprit:

#if defined(__DragonFly__) || defined(__APPLE__)
struct statfs buf;
if (statfs(path, &buf) == -1)
return;
mounted = true;

Changing path to ctx->path compiles and seems to run:

savage@pooh ~/opt/src/i3status/build > i3status 
i3status: trying to auto-detect output_format setting
i3status: auto-detected "term"
no IPv6 | 33.7 GiB | W: down | E: down | No battery | 2.09 | 2022-09-10 19:49:28
no IPv6 | 33.7 GiB | W: down | E: down | No battery | 2.09 | 2022-09-10 19:49:29
no IPv6 | 33.7 GiB | W: down | E: down | No battery | 2.00 | 2022-09-10 19:49:30
no IPv6 | 33.7 GiB | W: down | E: down | No battery | 2.00 | 2022-09-10 19:49:31
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

1 participant