Skip to contentSkip to conversation

Fix build with glibc 2.20

PATCH In review Khem Raj 2 participants 2 messages Aug 29, 2014

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 Fix build with glibc 2.20

* grub-core/kern/emu/hostfs.c: squahes below warning
warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

---
 grub-core/kern/emu/hostfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/kern/emu/hostfs.c +1 -1
index 7e725f6..8dd8e65 100644
@@ -19,7 +19,7 @@
 
 #include <config-util.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <grub/fs.h>
 #include <grub/file.h>
 #include <grub/disk.h>
Signature · 1 line
2.1.0
#1 lore raw
Quoted 2 lines · Khem Raj

* grub-core/kern/emu/hostfs.c: squahes below warning
warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

We still want it to compile under glibc < 2.20 as well. According to ocumentation

To allow code that requires
_BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE.

Could you test it and update patch accordingly?

Quoted 27 lines
---
 grub-core/kern/emu/hostfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/kern/emu/hostfs.c +1 -2
index 7e725f6..8dd8e65 100644
@@ -19,7 +19,7 @@
 
 #include <config-util.h>
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <grub/fs.h>
 #include <grub/file.h>
 #include <grub/disk.h>
--

2.1.0

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel