dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
b1bcb2
From 0000000000000000000000000000000000000000 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
b1bcb2
Subject: [PATCH] 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.