Fix build errors on Windows.
This commit is contained in:
parent
a69609a7d1
commit
2c7df22f4a
|
@ -551,16 +551,8 @@ static int flash_bsl_writemem(device_t dev_base,
|
||||||
static int enter_via_dtr_rts(struct flash_bsl_device *dev)
|
static int enter_via_dtr_rts(struct flash_bsl_device *dev)
|
||||||
{
|
{
|
||||||
sport_t fd = dev->serial_fd;
|
sport_t fd = dev->serial_fd;
|
||||||
int status;
|
int status = SPORT_MC_RTS;
|
||||||
|
|
||||||
if (ioctl(fd, TIOCMGET, &status) == -1)
|
|
||||||
{
|
|
||||||
perror("Read Port Error\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
status &= ~SPORT_MC_DTR;
|
|
||||||
status |= SPORT_MC_RTS;
|
|
||||||
if (sport_set_modem(fd, status) != 0)
|
if (sport_set_modem(fd, status) != 0)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <limits.h>
|
||||||
#include "usbutil.h"
|
#include "usbutil.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include "output_util.h"
|
#include "output_util.h"
|
||||||
|
|
Loading…
Reference in New Issue