Kaynağa Gözat

Cope with nic.h being included before (or without) dev.h

tags/v0.9.3
Michael Brown 19 yıl önce
ebeveyn
işleme
1218698e01
1 değiştirilmiş dosya ile 3 ekleme ve 4 silme
  1. 3
    4
      src/include/nic.h

+ 3
- 4
src/include/nic.h Dosyayı Görüntüle

@@ -8,10 +8,6 @@
8 8
 #ifndef	NIC_H
9 9
 #define NIC_H
10 10
 
11
-/* to get global "dev" */
12
-struct dev;
13
-#include "main.h"
14
-
15 11
 typedef enum {
16 12
 	DISABLE = 0,
17 13
 	ENABLE,
@@ -46,6 +42,7 @@ struct nic_operations {
46 42
  * Function prototypes
47 43
  *
48 44
  */
45
+struct dev;
49 46
 extern struct nic * nic_device ( struct dev * dev );
50 47
 
51 48
 /*
@@ -81,5 +78,7 @@ static inline void eth_disable ( void ) {
81 78
 
82 79
 /* dev.h needs declarations from nic.h */
83 80
 #include "dev.h"
81
+/* to get global "dev" */
82
+#include "main.h"
84 83
 
85 84
 #endif	/* NIC_H */

Loading…
İptal
Kaydet