mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
software/libliteeth: Fix missing prototype warnings.
This commit is contained in:
parent
7bf6db5f9d
commit
5a35aa9df6
1 changed files with 4 additions and 4 deletions
|
@ -44,25 +44,25 @@ static __inline uint64_t __bswap_64(uint64_t __x)
|
|||
#define bswap_32(x) __bswap_32(x)
|
||||
#define bswap_64(x) __bswap_64(x)
|
||||
|
||||
uint32_t htonl(uint32_t n)
|
||||
static uint32_t htonl(uint32_t n)
|
||||
{
|
||||
union { int i; char c; } u = { 1 };
|
||||
return u.c ? bswap_32(n) : n;
|
||||
}
|
||||
|
||||
uint16_t htons(uint16_t n)
|
||||
static uint16_t htons(uint16_t n)
|
||||
{
|
||||
union { int i; char c; } u = { 1 };
|
||||
return u.c ? bswap_16(n) : n;
|
||||
}
|
||||
|
||||
uint32_t ntohl(uint32_t n)
|
||||
static uint32_t ntohl(uint32_t n)
|
||||
{
|
||||
union { int i; char c; } u = { 1 };
|
||||
return u.c ? bswap_32(n) : n;
|
||||
}
|
||||
|
||||
uint16_t ntohs(uint16_t n)
|
||||
static uint16_t ntohs(uint16_t n)
|
||||
{
|
||||
union { int i; char c; } u = { 1 };
|
||||
return u.c ? bswap_16(n) : n;
|
||||
|
|
Loading…
Reference in a new issue