Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled build on FreeBSD. #177

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions heimdall/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ case $target in
AC_PROG_CXX
linuxtarget=false
;;
*-freebsd*)
AC_DEFINE(OS_FREEBSD, [], [FreeBSD backend])
AC_MSG_RESULT([FreeBSD])
AC_PROG_CXX
linuxtarget=false
;;
*)
AC_MSG_ERROR([unsupported operating system])
esac
Expand Down
13 changes: 12 additions & 1 deletion heimdall/source/Heimdall.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "../config.h"

#if defined(OS_DARWIN) || defined(OS_LINUX)
#if defined(OS_DARWIN) || defined(OS_LINUX) || defined(OS_FREEBSD)
#include <unistd.h>
#define Sleep(t) usleep(1000*t)
#else
Expand All @@ -47,4 +47,15 @@

#endif

#if defined(OS_FREEBSD)
/* LibUSB-X fix. */
enum libusb_log_level {
LIBUSB_LOG_LEVEL_NONE = 0,
LIBUSB_LOG_LEVEL_ERROR,
LIBUSB_LOG_LEVEL_WARNING,
LIBUSB_LOG_LEVEL_INFO,
LIBUSB_LOG_LEVEL_DEBUG,
};
#endif

#endif
5 changes: 5 additions & 0 deletions libpit/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ case $target in
AC_MSG_RESULT([Windows])
AC_PROG_CXX
;;
*-freebsd*)
AC_DEFINE(OS_FREEBSD, [], [FreeBSD backend])
AC_MSG_RESULT([FreeBSD])
AC_PROG_CXX
;;
*)
AC_MSG_ERROR([unsupported operating system])
esac
Expand Down