Commit 0137d629 authored by Meng Zhang's avatar Meng Zhang Committed by Facebook Github Bot 2

Make it build on Ubuntu 16.04

Summary:
include linux/membarrier.h if it is available.
Closes https://github.com/facebook/folly/pull/455

Reviewed By: lukenels

Differential Revision: D3714952

Pulled By: Orvid

fbshipit-source-id: 8c85756af2cb132152b2182816becfea138f0149
parent aeef60dd
......@@ -524,7 +524,8 @@ AC_CHECK_HEADER([snappy.h], AC_CHECK_LIB([snappy], [main]))
AC_CHECK_HEADER([zlib.h], AC_CHECK_LIB([z], [main]))
AC_CHECK_HEADER([lzma.h], AC_CHECK_LIB([lzma], [main]))
AC_CHECK_HEADER([zstd.h], AC_CHECK_LIB([zstd], [main]))
AC_CHECK_HEADER([linux/membarrier.h], AC_DEFINE([HAVE_LINUX_MEMBARRIER_H], [1], [Define to 1 if membarrier.h is available]))
AC_ARG_ENABLE([follytestmain],
AS_HELP_STRING([--enable-follytestmain], [enables using main function from folly for tests]),
[follytestmain=${enableval}], [follytestmain=no])
......
......@@ -28,6 +28,8 @@
#define __NR_membarrier 324
#define MEMBARRIER_CMD_QUERY 0
#define MEMBARRIER_CMD_SHARED 1
#elif FOLLY_HAVE_LINUX_MEMBARRIER_H
#include <linux/membarrier.h>
#endif
#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