openscap/openscap-1.3.3-duplicate-globals.patch
Jan Černý 4a2ee82472 Fix duplicate global variables
Resolves: RHBZ#1793914
2020-01-27 10:54:51 +01:00

63 lines
2.0 KiB
Diff

From e9ae8e3fac97694aa9cbb1350b90f110e461e02d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
Date: Wed, 22 Jan 2020 12:59:47 +0100
Subject: [PATCH] Fix duplicate global variables
This should fix failed builds with GCC 10 on Rawhide.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1793914
---
src/OVAL/probes/unix/process58_probe.c | 2 +-
src/OVAL/probes/unix/process_probe.c | 4 ++--
src/OVAL/probes/unix/shadow_probe.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/OVAL/probes/unix/process58_probe.c b/src/OVAL/probes/unix/process58_probe.c
index 3b8d8d1d2..74a2feee0 100644
--- a/src/OVAL/probes/unix/process58_probe.c
+++ b/src/OVAL/probes/unix/process58_probe.c
@@ -152,7 +152,7 @@ static void report_finding(struct result_info *res, probe_ctx *ctx)
#if defined(OS_LINUX)
-unsigned long ticks, boot;
+static unsigned long ticks, boot;
static void get_boot_time(void)
{
diff --git a/src/OVAL/probes/unix/process_probe.c b/src/OVAL/probes/unix/process_probe.c
index ab0bdf67a..cc4e46ff1 100644
--- a/src/OVAL/probes/unix/process_probe.c
+++ b/src/OVAL/probes/unix/process_probe.c
@@ -58,7 +58,7 @@
#include "process_probe.h"
#include "oscap_helpers.h"
-oval_schema_version_t over;
+static oval_schema_version_t over;
/* Convenience structure for the results being reported */
struct result_info {
@@ -106,7 +106,7 @@ static void report_finding(struct result_info *res, probe_ctx *ctx)
#if defined(OS_LINUX)
-unsigned long ticks, boot;
+static unsigned long ticks, boot;
static void get_boot_time(void)
{
diff --git a/src/OVAL/probes/unix/shadow_probe.c b/src/OVAL/probes/unix/shadow_probe.c
index b1fe15095..24e3a4651 100644
--- a/src/OVAL/probes/unix/shadow_probe.c
+++ b/src/OVAL/probes/unix/shadow_probe.c
@@ -61,7 +61,7 @@
#include <probe/option.h>
#include "shadow_probe.h"
-oval_schema_version_t over;
+static oval_schema_version_t over;
#ifndef HAVE_SHADOW_H
int shadow_probe_main(probe_ctx *ctx, void *arg)