build fix: use __func__ instead of __function__

Dave Young dyoung at redhat.com
Mon Dec 12 04:30:45 EST 2011


Below build failure happens:
kexec/crashdump.c: In function ‘get_crash_notes_per_cpu’:
kexec/crashdump.c:106: error: ‘__function__’ undeclared (first use in this function)
kexec/crashdump.c:106: error: (Each undeclared identifier is reported only once
kexec/crashdump.c:106: error: for each function it appears in.)
make: *** [kexec/crashdump.o] Error 1

change to use __func__ instead of __function to fix this issue.
---
 kexec/crashdump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/crashdump.c b/kexec/crashdump.c
index e7ac42c..db4a31e 100644
--- a/kexec/crashdump.c
+++ b/kexec/crashdump.c
@@ -103,7 +103,7 @@ int get_crash_notes_per_cpu(int cpu, uint64_t *addr, uint64_t *len)
 	*addr = (uint64_t) temp;
 	*len = MAX_NOTE_BYTES; /* we should get this from the kernel instead */
 #ifdef DEBUG
-	printf("%s: crash_notes addr = %Lx\n", __function__, *addr);
+	printf("%s: crash_notes addr = %Lx\n", __func__, *addr);
 #endif
 
 	fclose(fp);
-- 
1.7.4.4




More information about the kexec mailing list