]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
configure: Switch to C11 by default
authorFrank Lichtenheld <frank@lichtenheld.com>
Wed, 10 Jul 2024 16:03:06 +0000 (18:03 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 17 Jul 2024 20:02:29 +0000 (22:02 +0200)
Mostly so we can use anonymous structs without jumping through
hoops or relying on unofficial support.

Change-Id: I72934e747d1ad68a7e3675afbeb1b63df7941186
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20240710160306.190351-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28916.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CMakeLists.txt
configure.ac

index 096837de9efcf34594515aa5364b87c34cf7f226..ad620fa3ce99fc7d140983029c5851f568657755 100644 (file)
@@ -119,7 +119,7 @@ set(OPENVPN_VERSION_MINOR ${PRODUCT_VERSION_MINOR})
 set(OPENVPN_VERSION_PATCH ${PRODUCT_VERSION_PATCH})
 set(OPENVPN_VERSION_RESOURCE ${PRODUCT_VERSION_RESOURCE})
 
-set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD 11)
 
 # Set the various defines for config.h.cmake.in
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
index 555c97e75e5f66ea9e40b631edfe38880096ca50..9ce826ca5892ea56bfa6666578ef383bb730e604 100644 (file)
@@ -421,10 +421,10 @@ AC_CHECK_PROGS([RST2MAN], [rst2man rst2man.py])
 AC_CHECK_PROGS([RST2HTML], [rst2html rst2html.py])
 AM_CONDITIONAL([HAVE_PYDOCUTILS], [test "${RST2MAN}" -a "${RST2HTML}"])
 
-# Set -std=c99 unless user already specified a -std=
+# Set -std=c11 unless user already specified a -std=
 case "${CFLAGS}" in
   *-std=*) ;;
-  *)       CFLAGS="${CFLAGS} -std=c99" ;;
+  *)       CFLAGS="${CFLAGS} -std=c11" ;;
 esac
 
 #