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

[BUG] Building wifi_linux.c without linux/wireless.h raises an error #1160

Closed
Dariqq opened this issue Aug 5, 2024 · 0 comments
Closed

[BUG] Building wifi_linux.c without linux/wireless.h raises an error #1160

Dariqq opened this issue Aug 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Dariqq
Copy link
Contributor

Dariqq commented Aug 5, 2024

General description of bug:

When trying to build a fastfetch using wifi_linux.c where FF_HAVE_LINUX_WIRELESS is not set an error is raised:

./src/detection/wifi/wifi_linux.c: In function ‘ffDetectWifi’:
./src/detection/wifi/wifi_linux.c:279:13: error: implicit declaration of function ‘ffPathExists’ [-Wimplicit-function-declaration]
  279 |         if(!ffPathExists(buffer.chars, FF_PATHTYPE_DIRECTORY))
      |             ^~~~~~~~~~~~
./src/detection/wifi/wifi_linux.c:279:40: error: ‘FF_PATHTYPE_DIRECTORY’ undeclared (first use in this function)
  279 |         if(!ffPathExists(buffer.chars, FF_PATHTYPE_DIRECTORY))
      |                                        ^~~~~~~~~~~~~~~~~~~~~
./src/detection/wifi/wifi_linux.c:279:40: note: each undeclared identifier is reported only once for each function it appears in
./src/detection/wifi/wifi_linux.c:295:14: error: implicit declaration of function ‘ffAppendFileBuffer’ [-Wimplicit-function-declaration]
  295 |         if (!ffAppendFileBuffer(buffer.chars, &item->inf.status))
      |              ^~~~~~~~~~~~~~~~~~
./src/detection/wifi/wifi_linux.c:305:17: error: implicit declaration of function ‘detectWifiWithIoctls’; did you mean ‘detectWifiWithIw’? [-Wimplicit-function-declaration]
  305 |                 detectWifiWithIoctls(item);
      |                 ^~~~~~~~~~~~~~~~~~~~
      |                 detectWifiWithIw

Moving the #include "common/io/io.h statement out of the #if FF_HAVE_LINUX_WIRELESS include guard seems to solve build error.

  • What happened: Build error.

  • Fastfetch version used: 2.21

  • Did it work in an older version: yes, anything before 2.21

@Dariqq Dariqq added the bug Something isn't working label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant