Since we have an obscenely wide supported version spread, we have to
support the deprecated location, too.
Signed-off-by: Adam Emerson <aemerson@redhat.com>
// vim: ts=8 sw=2 smarttab ft=cpp
#include "rgw_amqp.h"
+#if __has_include(<rabbitmq-c/amqp.h>)
+#include <rabbitmq-c/amqp.h>
+#include <rabbitmq-c/ssl_socket.h>
+#include <rabbitmq-c/tcp_socket.h>
+#include <rabbitmq-c/framing.h>
+#else
#include <amqp.h>
#include <amqp_ssl_socket.h>
#include <amqp_tcp_socket.h>
#include <amqp_framing.h>
+#endif // __has_include(<rabbitmq-c/amqp.h>)
#include "include/ceph_assert.h"
#include <sstream>
#include <cstring>
// vim: ts=8 sw=2 smarttab
#include "amqp_mock.h"
+#if __has_include(<rabbitmq-c/amqp.h>)
+#include <rabbitmq-c/amqp.h>
+#include <rabbitmq-c/ssl_socket.h>
+#include <rabbitmq-c/tcp_socket.h>
+#else
#include <amqp.h>
#include <amqp_ssl_socket.h>
#include <amqp_tcp_socket.h>
+#endif
#include <string>
#include <stdarg.h>
#include <mutex>
#define _CRT_SECURE_NO_WARNINGS
#endif
-#include "amqp.h"
+#if __has_include(<rabbitmq-c/amqp.h>)
+#include <rabbitmq-c/amqp.h>
+#else
+#include <amqp.h>
+#endif
#include <limits.h>
#include <stdint.h>
#include <stdio.h>