From: Jason Gunthorpe <jgg@xxxxxxxxxxxx> We have several places now that use C99 features and assume those are enabled. Very old GCC's default to C89 and need to have C99 mode enabled by command line, such as Centos 6. Fix building on those old compilers by forcing C99 mode. Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx> --- buildlib/RDMA_EnableCStd.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildlib/RDMA_EnableCStd.cmake b/buildlib/RDMA_EnableCStd.cmake index c8a8c1f5530c13..c2e170929b7dde 100644 --- a/buildlib/RDMA_EnableCStd.cmake +++ b/buildlib/RDMA_EnableCStd.cmake @@ -49,6 +49,8 @@ function(RDMA_EnableCStd) CHECK_C_COMPILER_FLAG("-std=gnu11" SUPPORTS_GNU11) if (SUPPORTS_GNU11) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11" PARENT_SCOPE) + else() + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99" PARENT_SCOPE) endif() else() # Newer cmake can do this internally -- 2.16.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html