Browse code

core: Fixed inline function declaration for non-gcc linkers

usage of either 'extern inline' or 'static inline' depending on function scope is recommended

Marius Zbihlei authored on 14/09/2012 10:15:47
Showing 3 changed files
... ...
@@ -150,7 +150,7 @@ typedef union param_hooks {
150 150
  * 	0: success, but expect a next paramter
151 151
  * 	1: success and exepect no more parameters
152 152
  */
153
-inline int parse_param(str *_s, pclass_t _c, param_hooks_t *_h, param_t *t);
153
+extern inline int parse_param(str *_s, pclass_t _c, param_hooks_t *_h, param_t *t);
154 154
 
155 155
 
156 156
 /*! \brief
... ...
@@ -391,7 +391,7 @@ error:
391 391
  *                 in _host_ order.
392 392
  * @return the partial checksum in host order
393 393
  */
394
-inline unsigned short udpv4_vhdr_sum(	struct udphdr* uh,
394
+static inline unsigned short udpv4_vhdr_sum(	struct udphdr* uh,
395 395
 										struct in_addr* src,
396 396
 										struct in_addr* dst,
397 397
 										unsigned short length)
... ...
@@ -150,7 +150,7 @@ do { \
150 150
 
151 151
 
152 152
 
153
-inline struct via_body* via_body_cloner( char* new_buf,
153
+static inline struct via_body* via_body_cloner( char* new_buf,
154 154
 					char *org_buf, struct via_body *param_org_via, char **p)
155 155
 {
156 156
 	struct via_body *new_via;