summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/core/0003-socket.h-removing-dependency-of-gtest.patch
blob: 56c25eae34579ac060a2bbf6de7219fd5d467958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 4fdd086c2e9c85bc5a367a861696191e190cebc9 Mon Sep 17 00:00:00 2001
From: Nisha Parrakat <Nisha.Parrakat@kpit.com>
Date: Thu, 2 Mar 2023 17:20:48 +0100
Subject: [PATCH 03/15] socket.h: removing dependency of gtest

Removed the dependency of gtest on the build of fastboot binary.
Fixes below error

In file included from fastboot/fastboot.cpp:70:
| In file included from fastboot/tcp.h:36:
| fastboot/socket.h:43:10: fatal error: 'gtest/gtest_prod.h' file not found
| #include <gtest/gtest_prod.h>
|          ^~~~~~~~~~~~~~~~~~~~
| 1 error generated.
| In file included from fastboot/socket.cpp:29:
| fastboot/socket.h:43:10: fatal error: 'gtest/gtest_prod.h' file not found
| #include <gtest/gtest_prod.h>
|          ^~~~~~~~~~~~~~~~~~~~
| 1 error generated.
| In file included from fastboot/tcp.cpp:29:
| In file included from fastboot/tcp.h:36:
| fastboot/socket.h:43:10: fatal error: 'gtest/gtest_prod.h' file not found
| #include <gtest/gtest_prod.h>
|          ^~~~~~~~~~~~~~~~~~~~
| 1 error generated.
| In file included from fastboot/udp.cpp:31:
| In file included from fastboot/udp.h:34:
| fastboot/socket.h:43:10: fatal error: 'gtest/gtest_prod.h' file not found
| #include <gtest/gtest_prod.h>
|          ^~~~~~~~~~~~~~~~~~~~
| 1 error generated.

Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
---
 fastboot/socket.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fastboot/socket.h b/fastboot/socket.h
index e791f2c8..671fc115 100644
--- a/fastboot/socket.h
+++ b/fastboot/socket.h
@@ -40,7 +40,6 @@
 
 #include <android-base/macros.h>
 #include <cutils/sockets.h>
-#include <gtest/gtest_prod.h>
 
 // Socket interface to be implemented for each platform.
 class Socket {
@@ -119,8 +118,6 @@ class Socket {
             socket_send_buffers_function_ = &socket_send_buffers;
 
   private:
-    FRIEND_TEST(SocketTest, TestTcpSendBuffers);
-    FRIEND_TEST(SocketTest, TestUdpSendBuffers);
 
     DISALLOW_COPY_AND_ASSIGN(Socket);
 };
-- 
2.36.1.vfs.0.0