mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-16 06:59:55 -05:00
build-sys: Set C language standard to gnu11
Per glibc feature_test_macros(7), setting compiler flags to
-std=c11 (or any c* variant like c99) enforces strict ANSI
mode.
Enforcing strict ANSI makes all declarations under _GNU_SOURCE
unavailable. This leads to build warnings in the form of:
warning: implicit declaration of function ‘syscall’
Thus replace -std=c11 with -std=gnu11
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
b5e5475d96
commit
dcbe79bd63
2 changed files with 3 additions and 3 deletions
|
|
@ -176,9 +176,9 @@ esac
|
||||||
|
|
||||||
#### Compiler flags ####
|
#### Compiler flags ####
|
||||||
|
|
||||||
AX_CHECK_COMPILE_FLAG([-std=c11],
|
AX_CHECK_COMPILE_FLAG([-std=gnu11],
|
||||||
[],
|
[],
|
||||||
[AC_MSG_ERROR([*** Compiler does not support -std=c11])],
|
[AC_MSG_ERROR([*** Compiler does not support -std=gnu11])],
|
||||||
[-pedantic -Werror])
|
[-pedantic -Werror])
|
||||||
|
|
||||||
AX_APPEND_COMPILE_FLAGS(
|
AX_APPEND_COMPILE_FLAGS(
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ AM_CPPFLAGS = \
|
||||||
-DPA_SRCDIR=\"$(abs_srcdir)\" \
|
-DPA_SRCDIR=\"$(abs_srcdir)\" \
|
||||||
-DPA_BUILDDIR=\"$(abs_builddir)\" \
|
-DPA_BUILDDIR=\"$(abs_builddir)\" \
|
||||||
-DPULSE_LOCALEDIR=\"$(localedir)\"
|
-DPULSE_LOCALEDIR=\"$(localedir)\"
|
||||||
AM_CFLAGS = -std=c11 \
|
AM_CFLAGS = -std=gnu11 \
|
||||||
$(PTHREAD_CFLAGS)
|
$(PTHREAD_CFLAGS)
|
||||||
AM_CXXFLAGS = -std=c++11 \
|
AM_CXXFLAGS = -std=c++11 \
|
||||||
$(PTHREAD_CFLAGS)
|
$(PTHREAD_CFLAGS)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue