standalone eepro100_eeprom: fix build error
PATCH 1/1 standalone eepro100_eeprom: fix build error
Building examples/standalone/eepro100_eeprom triggers this error:
In file included from include/common.h:629,
from eepro100_eeprom.c:24:
include/net.h: In function 'NetReadIP':include/net.h:430: warning: implicit declaration of function 'memcpy' eepro100_eeprom.c: At top level:
eepro100_eeprom.c:81: error: conflicting types for 'memcpy' include/net.h:430: error: previous implicit declaration of 'memcpy' was here
Fix this.
--- examples/standalone/eepro100_eeprom.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
examples/standalone/eepro100_eeprom.c +2 -2
@@ -18,7 +18,7 @@*/ /* avoid unnecessary memcpy function */ -#define __HAVE_ARCH_MEMCPY +//#define __HAVE_ARCH_MEMCPY #define _PPC_STRING_H_#include <common.h>
@@ -77,7 +77,7 @@ static inline short inw(long addr)return swap16 (*(volatile short *)(addr)); } -static inline void *memcpy (void *dst,const void *src,unsigned int len) +void *memcpy (void *dst,const void *src,unsigned int len) {char *ret = dst;while (len-- >0 ) {
Signature · 1 line
1.6.6.1
PATCH v2 1/1 standalone eepro100_eeprom: fix build error
Building examples/standalone/eepro100_eeprom triggers this error:
In file included from include/common.h:629,
from eepro100_eeprom.c:24:
include/net.h: In function 'NetReadIP':include/net.h:430: warning: implicit declaration of function 'memcpy' eepro100_eeprom.c: At top level:
eepro100_eeprom.c:81: error: conflicting types for 'memcpy' include/net.h:430: error: previous implicit declaration of 'memcpy' was here
Fix this.
---
v2: delete line previously just commented out for testing
examples/standalone/eepro100_eeprom.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
examples/standalone/eepro100_eeprom.c +1 -2
@@ -18,7 +18,6 @@*/ /* avoid unnecessary memcpy function */ -#define __HAVE_ARCH_MEMCPY#define _PPC_STRING_H_#include <common.h>
@@ -77,7 +76,7 @@ static inline short inw(long addr)return swap16 (*(volatile short *)(addr)); } -static inline void *memcpy (void *dst,const void *src,unsigned int len) +void *memcpy (void *dst,const void *src,unsigned int len) {char *ret = dst;while (len-- >0 ) {
Signature · 1 line
1.6.6.1