Skip to content

Commit 8d7276b

Browse files
mrothfussraphnet
authored andcommitted
FreeBSD compilation fix
1 parent dc777b7 commit 8d7276b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ PLATFORM_CFLAGS=
1010
UNAME := $(shell uname -s)
1111
ifeq ($(UNAME), Linux)
1212
HIDAPI_NAME=hidapi-hidraw
13+
else ifeq ($(UNAME), FreeBSD)
14+
HIDAPI_NAME=hidapi
15+
PLATFORM_CFLAGS=-DFREEBSD
16+
CC=clang
1317
else
1418
HIDAPI_NAME=hidapi
1519
endif

src/gui_dfu_programmer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ int dfu_wrapper(const char *command, void (*lineCallback)(void *ctx, const char
5353
} else {
5454
updatelog_append("Pclose: %d\n", res);
5555
}
56-
#ifdef WINDOWS
57-
/* Mingw does not seem to provide the WIFEXITED/WEXITSTATUS macros.... */
56+
#if defined(WINDOWS) || defined(FREEBSD)
57+
/* Mingw and FreeBSD does not seem to provide the WIFEXITED/WEXITSTATUS macros.... */
5858
if (res!=0) {
5959
return DFU_ERROR_RETURN;
6060
}

0 commit comments

Comments
 (0)