diff options
author | Kevin Krakauer <krakauer@google.com> | 2021-07-15 15:32:22 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-15 15:34:34 -0700 |
commit | cd45d7b6c893aa763cdc3ef2f4ac86444b622927 (patch) | |
tree | 64f2b18f3d9fa7ab4f0e5c0b3ac6b58b4f731b1d /test/util | |
parent | 67d9050752ca99f1194ecd31bc2dfce470a404aa (diff) |
netstack: support SO_RCVBUFFORCE
TCP is fully supported. As with SO_RCVBUF, other transport protocols perform
no-ops per DefaultSocketOptionsHandler.OnSetReceiveBufferSize.
PiperOrigin-RevId: 385023239
Diffstat (limited to 'test/util')
-rw-r--r-- | test/util/capability_util.cc | 4 | ||||
-rw-r--r-- | test/util/capability_util.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/util/capability_util.cc b/test/util/capability_util.cc index a1b994c45..3bf218128 100644 --- a/test/util/capability_util.cc +++ b/test/util/capability_util.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifdef __linux__ + #include "test/util/capability_util.h" #include <linux/capability.h> @@ -79,3 +81,5 @@ PosixErrorOr<bool> CanCreateUserNamespace() { } // namespace testing } // namespace gvisor + +#endif // __linux__ diff --git a/test/util/capability_util.h b/test/util/capability_util.h index f2c370125..c4b0feade 100644 --- a/test/util/capability_util.h +++ b/test/util/capability_util.h @@ -17,6 +17,8 @@ #ifndef GVISOR_TEST_UTIL_CAPABILITY_UTIL_H_ #define GVISOR_TEST_UTIL_CAPABILITY_UTIL_H_ +#ifdef __linux__ + #include <errno.h> #include <linux/capability.h> #include <sys/syscall.h> @@ -120,4 +122,7 @@ class AutoCapability { } // namespace testing } // namespace gvisor + +#endif // __linux__ + #endif // GVISOR_TEST_UTIL_CAPABILITY_UTIL_H_ |