[4/7] remote: Remove unnecessary includes

Submitted by Andrey Vagin on July 11, 2018, 7:22 a.m.

Details

Message ID 20180711072252.GD3355@outlook.office365.com
State New
Series "Image-{cache,proxy} tweaks"
Headers show

Commit Message

Andrey Vagin July 11, 2018, 7:22 a.m.
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.



> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1@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@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu

Patch hide | download patch | download mbox

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)