Skip to contentSkip to conversation

Add include for offsetof macro

PATCH Applied Stefan Assmann 2 participants 2 messages Nov 5, 2008 – Nov 10, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add include for offsetof macro

kexec/arch/i386/kexec-elf-x86.c and kexec/arch/x86_64/kexec-elf-x86_64.c both use the macro offsetof() which according to the man page requires #include <stddef.h>.
The include is not present at the moment and this patch adds it. This is necessary for compatibility with i.e. uClibc.

---
 kexec/arch/i386/kexec-elf-x86.c      |    1 +
 kexec/arch/x86_64/kexec-elf-x86_64.c |    1 +
 2 files changed, 2 insertions(+)
kexec/arch/i386/kexec-elf-x86.c +1 -0
@@ -18,6 +18,7 @@
  */
 
 #define _GNU_SOURCE
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
kexec/arch/x86_64/kexec-elf-x86_64.c +1 -0
@@ -18,6 +18,7 @@
  */
 
 #define _GNU_SOURCE
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
Signature · 8 lines
Stefan Assmann          | SUSE LINUX Products GmbH
Software Engineer       | Maxfeldstr. 5, D-90409 Nuernberg
Mail: [email protected]  | GF: Markus Rex, HRB 16746 (AG Nuernberg)

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Applied
#1 lore raw
Quoted 7 lines · Stefan Assmann

kexec/arch/i386/kexec-elf-x86.c and kexec/arch/x86_64/kexec-elf-x86_64.c both use the macro offsetof() which according to the man page requires #include <stddef.h>.
The include is not present at the moment and this patch adds it. This is necessary for compatibility with i.e. uClibc.

Thanks, applied.

Signature · 9 lines
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec