File tree 4 files changed +8
-14
lines changed
4 files changed +8
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 27
27
#include "config.h"
28
28
#include "tinyascii.h"
29
29
#include "tinyfetch.h"
30
-
30
+ #if defined( __linux__ ) || defined( __FreeBSD__ )
31
31
#if PCI_DETECTION == 1
32
32
#include <pci/pci.h>
33
33
#endif
34
+ #endif
34
35
35
36
/*
36
37
file parsing
@@ -319,6 +320,7 @@ void format_uptime(long int uptime) {
319
320
GPU detection
320
321
*/
321
322
323
+ #if defined(__linux__ ) || defined(__FreeBSD__ )
322
324
#if PCI_DETECTION == 1
323
325
char * get_gpu_name () {
324
326
struct pci_access * pacc ;
@@ -349,7 +351,7 @@ char *get_gpu_name() {
349
351
}
350
352
351
353
#endif
352
-
354
+ #endif
353
355
/*
354
356
main printing functions
355
357
*/
@@ -773,7 +775,7 @@ void tinycpu(void) {
773
775
}
774
776
#endif
775
777
}
776
-
778
+ #if defined( __linux__ ) || defined( __FreeBSD__ )
777
779
void tinygpu (void ) {
778
780
#if PCI_DETECTION == 1
779
781
char * gpu = get_gpu_name ();
@@ -787,7 +789,7 @@ void tinygpu(void) {
787
789
}
788
790
#endif
789
791
}
790
-
792
+ #endif
791
793
void tinyswap (void ) {
792
794
if (get_swap_status () != 1 ) {
793
795
return ;
Original file line number Diff line number Diff line change @@ -145,10 +145,11 @@ long int get_uptime_freebsd(void);
145
145
void format_uptime (long int uptime );
146
146
147
147
// GPU detection
148
+ #if defined(__linux__ ) || defined(__FreeBSD__ )
148
149
#if PCI_DETECTION == 1
149
150
char * get_gpu_name (void );
150
151
#endif
151
-
152
+ #endif
152
153
// main printing functions
153
154
void pretext (const char * string );
154
155
void fetchinfo (char * structname );
You can’t perform that action at this time.
0 commit comments