[PATCH] virt-aa-helper: Fix build by including virutil.h

Commit fb01e1a44d missed including virutil.h, causing the following compilation error ../../src/security/virt-aa-helper.c:1055:43: error: implicit declaration of function 'virHostGetDRMRenderNode' [-Werror=implicit-function-declaration] 1055 | char *defaultRenderNode = virHostGetDRMRenderNode(); Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- Pushing under the build-breaker rule. src/security/virt-aa-helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 6f36652c7c..b6f58efdea 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -41,6 +41,7 @@ #include "virxml.h" #include "viruuid.h" #include "virusb.h" +#include "virutil.h" #include "virpci.h" #include "virfile.h" #include "configmake.h" -- 2.25.0

On Tue, Feb 25, 2020 at 12:36 AM Jim Fehlig <jfehlig@suse.com> wrote:
Commit fb01e1a44d missed including virutil.h, causing the following compilation error
../../src/security/virt-aa-helper.c:1055:43: error: implicit declaration of function 'virHostGetDRMRenderNode' [-Werror=implicit-function-declaration] 1055 | char *defaultRenderNode = virHostGetDRMRenderNode();
Signed-off-by: Jim Fehlig <jfehlig@suse.com> ---
Pushing under the build-breaker rule.
Thanks Jim, it always built for me in all pre-tests which is odd. Thanks for fixing it so fast!
src/security/virt-aa-helper.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 6f36652c7c..b6f58efdea 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -41,6 +41,7 @@ #include "virxml.h" #include "viruuid.h" #include "virusb.h" +#include "virutil.h" #include "virpci.h" #include "virfile.h" #include "configmake.h" -- 2.25.0
-- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd

On 2/25/20 10:06 AM, Christian Ehrhardt wrote:
On Tue, Feb 25, 2020 at 12:36 AM Jim Fehlig <jfehlig@suse.com <mailto:jfehlig@suse.com>> wrote:
Commit fb01e1a44d missed including virutil.h, causing the following compilation error
../../src/security/virt-aa-helper.c:1055:43: error: implicit declaration of function 'virHostGetDRMRenderNode' [-Werror=implicit-function-declaration] 1055 | char *defaultRenderNode = virHostGetDRMRenderNode();
Signed-off-by: Jim Fehlig <jfehlig@suse.com <mailto:jfehlig@suse.com>> ---
Pushing under the build-breaker rule.
Thanks Jim, it always built for me in all pre-tests which is odd. Thanks for fixing it so fast!
In fact I think the commit that caused the problem was a different one (I blame the latest virutil.h include cleanup). The problem was that some header files included virutil.h directly and thus aa-helper code got it for free. After the include was removed, the helper needs to include virtuil.h explicitly. I haven't look at which commit exactly caused the problem. It doesn't really matter, does it? Michal

On 2/25/20 4:35 AM, Michal Privoznik wrote:
On 2/25/20 10:06 AM, Christian Ehrhardt wrote:
On Tue, Feb 25, 2020 at 12:36 AM Jim Fehlig <jfehlig@suse.com <mailto:jfehlig@suse.com>> wrote:
Commit fb01e1a44d missed including virutil.h, causing the following compilation error
../../src/security/virt-aa-helper.c:1055:43: error: implicit declaration of function 'virHostGetDRMRenderNode' [-Werror=implicit-function-declaration] 1055 | char *defaultRenderNode = virHostGetDRMRenderNode();
Signed-off-by: Jim Fehlig <jfehlig@suse.com <mailto:jfehlig@suse.com>> ---
Pushing under the build-breaker rule.
Thanks Jim, it always built for me in all pre-tests which is odd. Thanks for fixing it so fast!
In fact I think the commit that caused the problem was a different one (I blame the latest virutil.h include cleanup). The problem was that some header files included virutil.h directly and thus aa-helper code got it for free. After the include was removed, the helper needs to include virtuil.h explicitly. I haven't look at which commit exactly caused the problem. It doesn't really matter, does it?
Yep, I think you are right. It was likely commit b11e8ccc. But I also think you are right in that it really doesn't matter at this point :-). Regards, Jim
participants (3)
-
Christian Ehrhardt
-
Jim Fehlig
-
Michal Privoznik