[PATCH] Add include for offsetof macro

Stefan Assmann sassmann at suse.de
Wed Nov 5 04:41:49 EST 2008


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.

Signed-off-by: Stefan Assmann <sassmann at suse.de>

---
 kexec/arch/i386/kexec-elf-x86.c      |    1 +
 kexec/arch/x86_64/kexec-elf-x86_64.c |    1 +
 2 files changed, 2 insertions(+)

--- a/kexec/arch/i386/kexec-elf-x86.c
+++ b/kexec/arch/i386/kexec-elf-x86.c
@@ -18,6 +18,7 @@
  */

 #define _GNU_SOURCE
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
--- a/kexec/arch/x86_64/kexec-elf-x86_64.c
+++ b/kexec/arch/x86_64/kexec-elf-x86_64.c
@@ -18,6 +18,7 @@
  */

 #define _GNU_SOURCE
+#include <stddef.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>

-- 
Stefan Assmann          | SUSE LINUX Products GmbH
Software Engineer       | Maxfeldstr. 5, D-90409 Nuernberg
Mail: sassmann at suse.de  | GF: Markus Rex, HRB 16746 (AG Nuernberg)



More information about the kexec mailing list