Skip to content

Commit 6a5d7c6

Browse files
committed
Modifications for compatibility with GCC
1 parent 2f26d09 commit 6a5d7c6

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

libraries/USBHost/USBHost3GModule/IUSBHostSerial.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
#include "IUSBHostSerialListener.h"
3232

33+
// This is needed by some versions of GCC
34+
#undef putc
35+
#undef getc
36+
3337
class IUSBHostSerial {
3438
public:
3539

libraries/USBHost/USBHost3GModule/WANDongle.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#endif
2727

2828
#include "dbg.h"
29-
#include <cstdint>
29+
#include <stdint.h>
3030
#include "rtos.h"
3131

3232
#include "WANDongle.h"
@@ -168,7 +168,7 @@ void WANDongle::init()
168168
{
169169
WANDongleInitializer* initializer;
170170

171-
for(unsigned i = 0; i < m_totalInitializers; i++)
171+
for(int i = 0; i < m_totalInitializers; i++)
172172
{
173173
initializer = m_Initializers[i];
174174
USB_DBG("initializer=%p", initializer);
@@ -229,7 +229,7 @@ bool WANDongle::addInitializer(WANDongleInitializer* pInitializer)
229229

230230
WANDongle::~WANDongle()
231231
{
232-
for(unsigned i = 0; i < m_totalInitializers; i++)
232+
for(int i = 0; i < m_totalInitializers; i++)
233233
delete m_Initializers[i];
234234
}
235235

libraries/USBHost/USBHost3GModule/WANDongleInitializer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323

2424
#ifdef USBHOST_3GMODULE
2525

26-
#include <cstdint>
27-
using std::uint16_t;
28-
using std::uint32_t;
26+
#include <stdint.h>
2927

3028
#include "USBHost.h"
3129
#include "IUSBEnumerator.h"
@@ -44,6 +42,7 @@ class WANDongleInitializer : public IUSBEnumerator
4442
uint8_t m_serialIntfMap[WANDONGLE_MAX_SERIAL_PORTS];
4543

4644
public:
45+
virtual ~WANDongleInitializer() {}
4746
virtual uint16_t getMSDVid() = 0;
4847
virtual uint16_t getMSDPid() = 0;
4948

libraries/USBHost/USBHost3GModule/WANDongleSerialPort.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#endif
2727

2828
#include "dbg.h"
29-
#include <cstdint>
29+
#include <stdint.h>
3030
#include "rtos.h"
3131

3232
#include "WANDongleSerialPort.h"

0 commit comments

Comments
 (0)