Only try to use F_SETPIPE_SZ if it's available
[folly.git] / folly / wangle / channel / FileRegion.cpp
index 7d14a4af7c7f72bef9d1bf0da7b96b848c16548f..e9fa7d7ee50c0f14e3bfa3ec0f3ee289f5efd78f 100644 (file)
@@ -122,11 +122,13 @@ void FileRegion::FileWriteRequest::start() {
       return;
     }
 
+#ifdef F_SETPIPE_SZ
     // Max size for unprevileged processes as set in /proc/sys/fs/pipe-max-size
     // Ignore failures and just roll with it
     // TODO maybe read max size from /proc?
     fcntl(pipeFds[0], F_SETPIPE_SZ, 1048576);
     fcntl(pipeFds[1], F_SETPIPE_SZ, 1048576);
+#endif
 
     pipe_out_ = pipeFds[0];