neurobin / MT7630E

Modified easy installation package
https://neurobin.org/projects/softwares/unix/MT7630E/
233 stars 72 forks source link

Fix compile errors on Linux 5.6 due timespec and getnstimeofday #103

Closed Scapior closed 1 year ago

Scapior commented 4 years ago

When I was tried to compile the driver on Linux 5.6 I got this errors:

/home/scapior/Coding/MT7630E/rt2x00/rt2x00debug.c: In function ‘rt2x00debug_dump_frame’:
/home/scapior/Coding/MT7630E/rt2x00/rt2x00debug.c:175:20: error: storage size of ‘timestamp’ i
  175 |  struct TIMESTRUCT timestamp;
      |                    ^~~~~~~~~
/home/scapior/Coding/MT7630E/rt2x00/rt2x00debug.c:44:18: error: implicit declaration of functi
   44 | #define TIMEFUNC getnstimeofday
      |                  ^~~~~~~~~~~~~~
/home/scapior/Coding/MT7630E/rt2x00/rt2x00debug.c:181:2: note: in expansion of macro ‘TIMEFUNC
  181 |  TIMEFUNC(&timestamp);
      |  ^~~~~~~~
/home/scapior/Coding/MT7630E/rt2x00/rt2x00debug.c:175:20: warning: unused variable ‘timestamp’
  175 |  struct TIMESTRUCT timestamp;
      |                    ^~~~~~~~~

These errors appeared due Y2038 problem fix in the Linux kernel. The solution has taken here.