From 5a35aa9df6209d1800a8a917ced214a60192618c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 28 Sep 2021 17:46:23 +0200 Subject: [PATCH] software/libliteeth: Fix missing prototype warnings. --- litex/soc/software/libliteeth/inet.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litex/soc/software/libliteeth/inet.h b/litex/soc/software/libliteeth/inet.h index f56504b1d..dbe8c7b6b 100644 --- a/litex/soc/software/libliteeth/inet.h +++ b/litex/soc/software/libliteeth/inet.h @@ -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;