From 05e6878c8767cf7006675d5e5a646b2f74aa88c7 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sat, 2 Jan 2016 18:38:31 +0100 Subject: allow pfinet to link using -O0 This fixes a long list of undefined references when compiling with -O0 by using static instead of extern in header files. --- pfinet/linux-src/include/linux/bitops.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pfinet/linux-src/include/linux/bitops.h') diff --git a/pfinet/linux-src/include/linux/bitops.h b/pfinet/linux-src/include/linux/bitops.h index ddb84dd6..646edc42 100644 --- a/pfinet/linux-src/include/linux/bitops.h +++ b/pfinet/linux-src/include/linux/bitops.h @@ -8,7 +8,7 @@ * differs in spirit from the above ffz (man ffs). */ -extern __inline__ int generic_ffs(int x) +static __inline__ int generic_ffs(int x) { int r = 1; @@ -42,7 +42,7 @@ extern __inline__ int generic_ffs(int x) * of bits set) of a N-bit word */ -extern __inline__ unsigned int generic_hweight32(unsigned int w) +static __inline__ unsigned int generic_hweight32(unsigned int w) { unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); res = (res & 0x33333333) + ((res >> 2) & 0x33333333); @@ -51,7 +51,7 @@ extern __inline__ unsigned int generic_hweight32(unsigned int w) return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); } -extern __inline__ unsigned int generic_hweight16(unsigned int w) +static __inline__ unsigned int generic_hweight16(unsigned int w) { unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); res = (res & 0x3333) + ((res >> 2) & 0x3333); @@ -59,7 +59,7 @@ extern __inline__ unsigned int generic_hweight16(unsigned int w) return (res & 0x00FF) + ((res >> 8) & 0x00FF); } -extern __inline__ unsigned int generic_hweight8(unsigned int w) +static __inline__ unsigned int generic_hweight8(unsigned int w) { unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); res = (res & 0x33) + ((res >> 2) & 0x33); -- cgit v1.2.3