Open jenstroeger opened 2 years ago
Today I wanted to build i3status from source because it doesn’t seem to be available from MacPorts (whereas i3 is, albeit not maintained).
i3status
i3
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:
__APPLE__
https://github.com/i3/i3status/blob/30ea2d2da37187c9f1ef0fdd47d0999eb4751dc1/src/print_disk_info.c#L135-L141
Changing path to ctx->path compiles and seems to run:
path
ctx->path
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
Today I wanted to build
i3status
from source because it doesn’t seem to be available from MacPorts (whereasi3
is, albeit not maintained).So, following the instructions got me a few warnings and then
and it seems the
__APPLE__
code is the culprit:https://github.com/i3/i3status/blob/30ea2d2da37187c9f1ef0fdd47d0999eb4751dc1/src/print_disk_info.c#L135-L141
Changing
path
toctx->path
compiles and seems to run: