2330b7905fa2858a35e251da213f43ac670cf775
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / benejson / 0001-c-std.patch
1 Some older toolchains do not recognize c11 as a valid standard.
2 Since the code actually builds well with c99, use that instead.
3
4 The only two non-standard features used are // comments
5 and for(int i ...) declarations in C.
6
7 Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
8
9 --- a/SConstruct
10 +++ b/SConstruct
11 @@ -9,9 +9,8 @@ mydir = os.getcwd()
12  #Set default C++ building flags for both libraries and executables
13  default_env = Environment(ENV = os.environ)
14  default_env.Append(CPPPATH = [mydir + '/include'])
15 -default_env.Append(CCFLAGS = ' -Wall -pedantic')
16 -default_env.Append(CFLAGS = ' -std=c11')
17 -default_env.Append(CXXFLAGS = ' -std=c++11')
18 +default_env.Append(CFLAGS = ' -Wall')
19 +default_env.Append(CFLAGS = ' -std=c99')
20  #default_env.Append(CCFLAGS = ' -O2 -fomit-frame-pointer')
21  default_env.Append(CCFLAGS = ' -O0 -g')
22