Skip to content

Commit

Permalink
progress: Fix FreeBSD build
Browse files Browse the repository at this point in the history
FreeBSD hasn't defined ENODATA nor ETIME in errno.h.
Hence, define them by their semantically closest error
code existing in errno.h:
* Define ENODATA as ENOATTR (as in include/compat.h)
* Define ETIME as ETIMEDOUT

Note that other BSDs like NetBSD have them defined, so
this is for FreeBSD exclusively.

Signed-off-by: Christian Storm <[email protected]>
  • Loading branch information
stormc authored and sbabic committed Jan 15, 2025
1 parent 1969c01 commit 94aa185
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ipc/progress_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#include <unistd.h>
#include <stdbool.h>
#include <progress_ipc.h>
#if defined(__FreeBSD__)
#define ENODATA ENOATTR
#define ETIME ETIMEDOUT
#endif

#ifdef CONFIG_SOCKET_PROGRESS_PATH
char *SOCKET_PROGRESS_PATH = (char*)CONFIG_SOCKET_PROGRESS_PATH;
Expand Down

0 comments on commit 94aa185

Please sign in to comment.