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