From 9a64a229a0a3fbfa0bd317849cb37186e8cec43d Mon Sep 17 00:00:00 2001 From: bernhardkaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Sun, 26 Sep 2021 10:29:43 +0200 Subject: xfwp: Fix build using: env.append_flags('CPPFLAGS', '-D_GNU_SOURCE') (#26157) Without -D_GNU_SOURCE, the build of xfwp has many compilation errors. Example: io.c:1039:7: error: implicit declaration of function 'swab' --- var/spack/repos/builtin/packages/xfwp/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/xfwp/package.py b/var/spack/repos/builtin/packages/xfwp/package.py index 0f8493c077..323f780bc7 100644 --- a/var/spack/repos/builtin/packages/xfwp/package.py +++ b/var/spack/repos/builtin/packages/xfwp/package.py @@ -21,5 +21,7 @@ class Xfwp(AutotoolsPackage, XorgPackage): depends_on('pkgconfig', type='build') depends_on('util-macros', type='build') - # FIXME: fails with the error message: + # Fixes this and a long list of other compilation errors: # io.c:1039:7: error: implicit declaration of function 'swab' + def setup_build_environment(self, env): + env.append_flags('CPPFLAGS', '-D_GNU_SOURCE') -- cgit v1.2.3-60-g2f50