diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2026-02-28 14:43:26 +0200 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2026-02-28 14:43:26 +0200 |
| commit | 74596d8273552f11959fe51fb8fff84a18ca9b83 (patch) | |
| tree | b7f164166586ed456fbcd9be8860ff9382132bf5 | |
| parent | 2a6d855693a0ae6cfe8078e91b1c4ae1c92c3603 (diff) | |
build: Maybe fix OpenBSD
We'll see how this goes...
| -rw-r--r-- | config.h.in | 9 | ||||
| -rwxr-xr-x | configure | 3 | ||||
| -rw-r--r-- | 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 @@ -162,6 +162,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. // #include "$CFG_MACRO_GEN" @@ -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. @@ -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 <assert.h> #include <dirent.h> #include <errno.h> @@ -50,8 +53,6 @@ #include <sys/types.h> #include <sys/wait.h> -#include "config.h" - #include "lib/arg.h" #include "lib/bitset.h" #include "lib/date.h" |