X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Fio%2Fasync%2FEventFDWrapper.h;h=cd985f8e54e7cdc30302d3dbadf3396da3ce066c;hp=294d9d37b881a54660d4c2f51442ab6a941e0160;hb=1672380910a8c21cd36095661eb1360f43c93332;hpb=779cbf35527d33c4073a3c8929e284e9a16b0e50 diff --git a/folly/io/async/EventFDWrapper.h b/folly/io/async/EventFDWrapper.h index 294d9d37..cd985f8e 100644 --- a/folly/io/async/EventFDWrapper.h +++ b/folly/io/async/EventFDWrapper.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,24 @@ #pragma once -#include +#ifndef FOLLY_NO_CONFIG +#include +#endif + +#ifdef FOLLY_HAVE_FEATURES_H +# include +#endif + +#if defined(__GLIBC__) && !defined(__APPLE__) +#if __GLIBC_PREREQ(2, 9) +# define FOLLY_GLIBC_2_9 +#endif +#endif // doesn't exist on older glibc versions -#if (defined(__GLIBC__) && __GLIBC_PREREQ(2, 9)) +#ifdef FOLLY_GLIBC_2_9 #include -#else /* !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 9)) */ +#else /* !def FOLLY_GLIBC_2_9 */ #include #include @@ -37,8 +49,10 @@ // arch/x86/include/asm/unistd_{32,64}.h #ifndef __NR_eventfd2 #if FOLLY_X64 +/* nolint */ #define __NR_eventfd2 290 #elif defined(__i386__) +/* nolint */ #define __NR_eventfd2 328 #else #error "Can't define __NR_eventfd2 for your architecture."