diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-01-02 18:38:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-02 18:48:57 +0100 |
commit | 05e6878c8767cf7006675d5e5a646b2f74aa88c7 (patch) | |
tree | 3cba4a57d98573761d4538f6a24f1be1c2b2c197 /pfinet/linux-src/include/linux/bitops.h | |
parent | 5714421bb1d066abebc7e993bdf06e655b879b3a (diff) | |
download | hurd-05e6878c8767cf7006675d5e5a646b2f74aa88c7.tar.gz hurd-05e6878c8767cf7006675d5e5a646b2f74aa88c7.tar.bz2 hurd-05e6878c8767cf7006675d5e5a646b2f74aa88c7.zip |
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.
Diffstat (limited to 'pfinet/linux-src/include/linux/bitops.h')
-rw-r--r-- | pfinet/linux-src/include/linux/bitops.h | 8 |
1 files changed, 4 insertions, 4 deletions
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); |