From 491224ddf2d302866b680f18b1d188da2595a527 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 2 Oct 2024 10:59:46 +0200 Subject: [PATCH] Fix compilation on FreeBSD On FreeBSD, we need to set _XOPEN_SOURCE_EXTENDED (or __BSD_VISIBLE) to access everything we need. --- ttyplot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ttyplot.c b/ttyplot.c index bb8e758..4213b78 100644 --- a/ttyplot.c +++ b/ttyplot.c @@ -7,9 +7,9 @@ // Apache License 2.0 // -// This is needed on macOS to get the ncurses widechar API, and pkg-config fails to -// define it. -#ifdef __APPLE__ +// This is needed on FreeBSD and macOS to get the ncurses widechar API, +// and pkg-config fails to define it. +#if defined(__APPLE__) || defined(__FreeBSD__) #define _XOPEN_SOURCE_EXTENDED #else // This is needed for musl libc