[CRIU] [PATCH 4/7] remote: Remove unnecessary includes

Andrei Vagin avagin at virtuozzo.com
Wed Jul 11 10:22:53 MSK 2018


On Sun, Jul 08, 2018 at 05:47:08PM +0100, Radostin Stoyanov wrote:
> pthread.h and semaphore.h are already included in img-remote.h

We don't need pthread.h, because img-proxy was rewritten without
threads. Do we still need semaphore.h?

And I think we don't need to link with libpthread.

diff --git a/criu/Makefile.packages b/criu/Makefile.packages
index 2cea94781..d828cb611 100644
--- a/criu/Makefile.packages
+++ b/criu/Makefile.packages
@@ -32,7 +32,7 @@ REQ-DEB-PKG-NAMES     += python-future
 REQ-RPM-PKG-TEST-NAMES += $(PYTHON)-pyyaml
 endif
 
-export LIBS            += -lrt -lpthread -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/ -lnet
+export LIBS            += -lrt -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/ -lnet
 
 check-packages-failed:
        $(warning Can not find some of the required libraries)


> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
> ---
>  criu/img-cache.c  | 1 -
>  criu/img-proxy.c  | 1 -
>  criu/img-remote.c | 2 --
>  3 files changed, 4 deletions(-)
> 
> diff --git a/criu/img-cache.c b/criu/img-cache.c
> index 1eadb977..ac737150 100644
> --- a/criu/img-cache.c
> +++ b/criu/img-cache.c
> @@ -2,7 +2,6 @@
>  
>  #include "img-remote.h"
>  #include "criu-log.h"
> -#include <pthread.h>
>  #include <sys/socket.h>
>  #include <netinet/in.h>
>  #include <fcntl.h>
> diff --git a/criu/img-proxy.c b/criu/img-proxy.c
> index a19d3050..34c23dda 100644
> --- a/criu/img-proxy.c
> +++ b/criu/img-proxy.c
> @@ -2,7 +2,6 @@
>  
>  #include "img-remote.h"
>  #include "criu-log.h"
> -#include <pthread.h>
>  #include <fcntl.h>
>  #include <netdb.h>
>  #include <sys/socket.h>
> diff --git a/criu/img-remote.c b/criu/img-remote.c
> index 51fa0337..77dd0411 100644
> --- a/criu/img-remote.c
> +++ b/criu/img-remote.c
> @@ -15,9 +15,7 @@
>  #include "common/compiler.h"
>  #include "cr_options.h"
>  
> -#include <semaphore.h>
>  #include "sys/un.h"
> -#include <pthread.h>
>  #include <sys/file.h>
>  
>  #include "protobuf.h"
> -- 
> 2.17.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list