Skip to content

Commit 472115d

Browse files
committed
trying things
Signed-off-by: kernaltrap <[email protected]>
1 parent 4b8d280 commit 472115d

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

src/config.h

-9
This file was deleted.

src/tinyfetch

-38.3 KB
Binary file not shown.

src/tinyfetch.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727
#include "config.h"
2828
#include "tinyascii.h"
2929
#include "tinyfetch.h"
30-
30+
#if defined(__linux__) || defined(__FreeBSD__)
3131
#if PCI_DETECTION == 1
3232
#include <pci/pci.h>
3333
#endif
34+
#endif
3435

3536
/*
3637
file parsing
@@ -319,6 +320,7 @@ void format_uptime(long int uptime) {
319320
GPU detection
320321
*/
321322

323+
#if defined(__linux__) || defined(__FreeBSD__)
322324
#if PCI_DETECTION == 1
323325
char *get_gpu_name() {
324326
struct pci_access *pacc;
@@ -349,7 +351,7 @@ char *get_gpu_name() {
349351
}
350352

351353
#endif
352-
354+
#endif
353355
/*
354356
main printing functions
355357
*/
@@ -773,7 +775,7 @@ void tinycpu(void) {
773775
}
774776
#endif
775777
}
776-
778+
#if defined(__linux__) || defined(__FreeBSD__)
777779
void tinygpu(void) {
778780
#if PCI_DETECTION == 1
779781
char *gpu = get_gpu_name();
@@ -787,7 +789,7 @@ void tinygpu(void) {
787789
}
788790
#endif
789791
}
790-
792+
#endif
791793
void tinyswap(void) {
792794
if (get_swap_status() != 1) {
793795
return;

src/tinyfetch.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,11 @@ long int get_uptime_freebsd(void);
145145
void format_uptime(long int uptime);
146146

147147
// GPU detection
148+
#if defined(__linux__) || defined(__FreeBSD__)
148149
#if PCI_DETECTION == 1
149150
char *get_gpu_name(void);
150151
#endif
151-
152+
#endif
152153
// main printing functions
153154
void pretext(const char *string);
154155
void fetchinfo(char *structname);

0 commit comments

Comments
 (0)