Commit 9151f52b authored by Kevin Vigor's avatar Kevin Vigor Committed by Facebook GitHub Bot

fix SimpleAsyncIO build for fboss.

Summary:
Evidently unlike folly, headers may be present in cmake even if they are excluded from
build.

Check that we have required headers before including AsyncIO.h or IoUring.h.

Differential Revision: D24117788

fbshipit-source-id: fec359c8298a21575a8714dd2abdbd9d4dc3e5c4
parent 2a60d871
......@@ -16,11 +16,11 @@
#include <folly/experimental/io/SimpleAsyncIO.h>
#include <folly/String.h>
#if __has_include(<folly/experimental/io/AsyncIO.h>)
#if __has_include(<folly/experimental/io/AsyncIO.h>) && __has_include(<libaio.h>)
#define AIO_SUPPORTED
#include <folly/experimental/io/AsyncIO.h>
#endif
#if __has_include(<folly/experimental/io/IoUring.h>)
#if __has_include(<folly/experimental/io/IoUring.h>) && __has_include(<liburing.h>)
#define IOURING_SUPPORTED
#include <folly/experimental/io/IoUring.h>
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment