Fix missing declaration of strchrnul in rpm-sort

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-05-05 22:14:21 +00:00
parent d15d46b0e4
commit ea7cfdf726
3 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Thu, 5 May 2022 18:01:05 -0400
Subject: [PATCH] rpm-sort: add prereqs for declaration of strchrnul()
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
util/grub-rpm-sort.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/util/grub-rpm-sort.c b/util/grub-rpm-sort.c
index 8345944105..71d038bb69 100644
--- a/util/grub-rpm-sort.c
+++ b/util/grub-rpm-sort.c
@@ -1,13 +1,17 @@
+#define _GNU_SOURCE 1
+
#include <config.h>
+
+#include <argp.h>
+#include <assert.h>
+#include <errno.h>
#include <grub/types.h>
#include <grub/util/misc.h>
+#include <rpm/rpmlib.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
-#include <errno.h>
-#include <assert.h>
-#include <argp.h>
-#include <rpm/rpmlib.h>
static size_t
read_file (const char *input, char **ret)

View file

@ -215,3 +215,4 @@ Patch0214: 0214-grub-core-loader-efi-linux.c-drop-now-unused-grub_li.patch
Patch0215: 0215-powerpc-do-CAS-in-a-more-compatible-way.patch
Patch0216: 0216-powerpc-prefix-detection-support-device-names-with-c.patch
Patch0217: 0217-ibmvtpm-Add-support-for-trusted-boot-using-a-vTPM-2..patch
Patch0218: 0218-rpm-sort-add-prereqs-for-declaration-of-strchrnul.patch

View file

@ -17,7 +17,7 @@
Name: grub2
Epoch: 1
Version: 2.06
Release: 39%{?dist}
Release: 40%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+
URL: http://www.gnu.org/software/grub/
@ -530,6 +530,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif
%changelog
* Thu May 05 2022 Robbie Harwood <rharwood@redhat.com> - 1:2.06-40
- Fix missing declaration of strchrnul in rpm-sort
* Wed May 04 2022 Robbie Harwood <rharwood@redhat.com> - 1:2.06-39
- ppc64le: CAS improvements, prefix detection, and vTPM support