Skip to content

Commit

Permalink
fix: build on FreeBSD (#41)
Browse files Browse the repository at this point in the history
This commit addresses issues causing the build to break on the FreeBSD
platform.
  • Loading branch information
michaeladler authored Aug 24, 2023
1 parent 4e7ebf3 commit a73df87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions bee/net/endpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# include <sys/un.h>
# if defined(__FreeBSD__)
# include <netinet/in.h>
# include <sys/socket.h>
# endif
# ifndef UNIX_PATH_MAX
# define UNIX_PATH_MAX (sizeof(sockaddr_un::sun_path) / sizeof(sockaddr_un::sun_path[0]))
Expand Down
4 changes: 3 additions & 1 deletion bee/net/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# include <unistd.h>
# if defined(__APPLE__)
# include <sys/ioctl.h>
# elif defined(__FreeBSD__)
# include <sys/socket.h>
# endif
#endif

Expand Down Expand Up @@ -260,7 +262,7 @@ namespace bee::net::socket {
#endif
}

#if defined(_WIN32) || defined(__APPLE__)
#if defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
static void set_error(int err) noexcept {
# if defined(_WIN32)
::WSASetLastError(err);
Expand Down

0 comments on commit a73df87

Please sign in to comment.