Move variable declarations from header to source 26/127926/1 accepted/tizen_4.0_unified accepted/tizen_unified tizen tizen_4.0 accepted/tizen/4.0/unified/20170816.013033 accepted/tizen/4.0/unified/20170828.222628 accepted/tizen/unified/20170613.194134 submit/tizen/20170613.042222 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100006
authorSlava Barinov <v.barinov@samsung.com>
Tue, 2 May 2017 11:02:19 +0000 (14:02 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Tue, 2 May 2017 11:07:17 +0000 (14:07 +0300)
This makes build with -fno-common possible and allows ASan enabling.

Change-Id: If8aae6e82f692837bcb816cbeae39608ba99975a
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
src/rpc_com.h
src/svc.c

index 38c2cfe..f50a409 100644 (file)
@@ -87,8 +87,8 @@ void __xprt_unregister_unlocked(SVCXPRT *);
 void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
 
 
-SVCXPRT **__svc_xports;
-int __svc_maxrec;
+extern SVCXPRT **__svc_xports;
+extern int __svc_maxrec;
 
 __END_DECLS
 
index 8afd15d..30f8930 100644 (file)
--- a/src/svc.c
+++ b/src/svc.c
@@ -60,6 +60,9 @@
 
 #define max(a, b) (a > b ? a : b)
 
+SVCXPRT **__svc_xports;
+int __svc_maxrec;
+
 /*
  * The services list
  * Each entry represents a set of procedures (an rpc program).
@@ -705,7 +708,7 @@ svc_getreq_common (fd)
        * If so, then break.
        */
       rwlock_rdlock (&svc_fd_lock);
-      
+
       if (xprt != __svc_xports[fd])
        {
          rwlock_unlock (&svc_fd_lock);