From 74596d8273552f11959fe51fb8fff84a18ca9b83 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Feb 2026 14:43:26 +0200 Subject: build: Maybe fix OpenBSD We'll see how this goes... --- config.h.in | 9 +++++++++ configure | 3 --- dfm.c | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/config.h.in b/config.h.in index eb2470a..ece0ddc 100644 --- a/config.h.in +++ b/config.h.in @@ -161,6 +161,15 @@ // #define DFM_MARGIN 3 +// +// OS specific flags. +// +#ifdef __linux__ +#define _GNU_SOURCE +#define _BSD_SOURCE +#define _POSIX_C_SOURCE 200809L +#endif + // // Configuration overrides from ./configure. // diff --git a/configure b/configure index b169a66..6c21732 100755 --- a/configure +++ b/configure @@ -63,11 +63,8 @@ export STRIP="${STRIP:-strip}" # Compiler flags. # export cc_flags="-std=$c_version -O2 -pipe" -export cc_flags="$cc_flags -D_POSIX_C_SOURCE=200809L" -export cc_flags="$cc_flags -D_BSD_SOURCE -D_GNU_SOURCE" export cc_flags="$cc_flags -Wall -Wextra -pedantic -Wshadow" - #/////////////////////////////////////////////////////////////////////////////// # # NOTE: Do not edit below this line. diff --git a/dfm.c b/dfm.c index c2fa0d5..6a2d16a 100644 --- a/dfm.c +++ b/dfm.c @@ -33,6 +33,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + +#include "config.h" + #include #include #include @@ -50,8 +53,6 @@ #include #include -#include "config.h" - #include "lib/arg.h" #include "lib/bitset.h" #include "lib/date.h" -- cgit v1.2.3