dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0298-Fix-build-with-glibc-2.20.patch

c4e390
From 4c926bc85d44fc11324f2e7e6337e156eb1c7e5e Mon Sep 17 00:00:00 2001
c4e390
From: Khem Raj <raj.khem@gmail.com>
c4e390
Date: Wed, 3 Sep 2014 01:15:08 -0700
c4e390
Subject: [PATCH 298/336] Fix build with glibc 2.20
c4e390
c4e390
* grub-core/kern/emu/hostfs.c: squahes below warning
c4e390
  warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
c4e390
c4e390
Signed-off-by: Khem Raj <raj.khem@gmail.com>
c4e390
c4e390
Upstream-commit-id: a276b840464
c4e390
---
c4e390
 grub-core/kern/emu/hostfs.c | 4 ++++
c4e390
 ChangeLog                   | 4 ++++
c4e390
 2 files changed, 8 insertions(+)
c4e390
c4e390
diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
c4e390
index 7e725f65f6a..823116da68e 100644
c4e390
--- a/grub-core/kern/emu/hostfs.c
c4e390
+++ b/grub-core/kern/emu/hostfs.c
c4e390
@@ -19,7 +19,11 @@
c4e390
 
c4e390
 #include <config-util.h>
c4e390
 
c4e390
+/* Legacy feature macro.*/
c4e390
 #define _BSD_SOURCE
c4e390
+/* New feature macro that provides everything _BSD_SOURCE and
c4e390
+ *    _SVID_SOURCE provided and possibly more.  */
c4e390
+#define _DEFAULT_SOURCE
c4e390
 #include <grub/fs.h>
c4e390
 #include <grub/file.h>
c4e390
 #include <grub/disk.h>
c4e390
diff --git a/ChangeLog b/ChangeLog
c4e390
index a2da9743231..d3f26cf2f0d 100644
c4e390
--- a/ChangeLog
c4e390
+++ b/ChangeLog
c4e390
@@ -1,3 +1,7 @@
c4e390
+2014-09-15  Khem Raj <raj.khem@gmail.com>
c4e390
+	* grub-core/kern/emu/hostfs.c: use _DEFAULT_SOURCE in addition to
c4e390
+	_BSD_SOURCE to avoid warnings under glibc 2.20+.
c4e390
+
c4e390
 2014-06-21  Роман Пехов <roman_pekhov>
c4e390
 
c4e390
 	* grub-core/commands/loadenv.c (check_blocklists): Fix overlap check.
c4e390
-- 
c4e390
2.26.2
c4e390