File kdump-mounts.cc-Include-sys-ioctl.h.patch of Package kdump

From: Petr Tesarik <ptesarik@suse.com>
Date: Fri Mar 5 18:25:14 2021 +0100
Subject: mounts.cc: Include <sys/ioctl.h>
Upstream: merged
Git-commit: 9c47874dadcdb39fbb3cededc46bc32449f42374

Since the code uses ioctl(), it should include the corresponding
header file. This was not found before release, because including
the header file is not necessary with some glibc versions...

Signed-off-by: Petr Tesarik <ptesarik@suse.com>

diff --git a/kdumptool/mounts.cc b/kdumptool/mounts.cc
index 79bf4fc..d792e53 100644
--- a/kdumptool/mounts.cc
+++ b/kdumptool/mounts.cc
@@ -36,6 +36,9 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+// for ioctl()
+#include <sys/ioctl.h>
+
 #include <linux/btrfs.h>
 
 #include "global.h"
openSUSE Build Service is sponsored by