Skip to content

Commit 9f1c242

Browse files
authored
Merge pull request #15 from MicrochipTech/bugfix/linux-build-fix
Linux build failure fix
2 parents f3f5baf + be44ddc commit 9f1c242

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/fw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ int switchtec_fw_write_fd(struct switchtec_dev *dev, int img_fd,
247247
int dont_activate, int force,
248248
void (*progress_callback)(int cur, int tot))
249249
{
250-
enum switchtec_fw_dlstatus status;
251-
enum mrpc_bg_status bgstatus;
250+
enum switchtec_fw_dlstatus status = SWITCHTEC_DLSTAT_ERROR_PROGRAM;
251+
enum mrpc_bg_status bgstatus = MRPC_BG_STAT_ERROR;
252252
ssize_t image_size, offset = 0;
253253
int ret;
254254
struct cmd_fwdl cmd = {};
@@ -367,8 +367,8 @@ int switchtec_fw_write_file(struct switchtec_dev *dev, FILE *fimg,
367367
int dont_activate, int force,
368368
void (*progress_callback)(int cur, int tot))
369369
{
370-
enum switchtec_fw_dlstatus status;
371-
enum mrpc_bg_status bgstatus;
370+
enum switchtec_fw_dlstatus status = SWITCHTEC_DLSTAT_ERROR_PROGRAM;
371+
enum mrpc_bg_status bgstatus = MRPC_BG_STAT_ERROR;
372372
ssize_t image_size, offset = 0;
373373
int ret;
374374
struct cmd_fwdl cmd = {};

lib/mfg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656
#include <stdio.h>
5757
#include <string.h>
5858
#include <openssl/sha.h>
59+
#ifndef _WIN32
60+
#include <arpa/inet.h>
61+
#endif
5962
#include <iconv.h>
6063

6164
#include "lib/crc.h"

0 commit comments

Comments
 (0)