]> code.ossystems Code Review - openembedded-core.git/commitdiff
insserv: Fix build with gcc5 and clang
authorKhem Raj <raj.khem@gmail.com>
Fri, 24 Apr 2015 03:35:20 +0000 (20:35 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Apr 2015 13:57:45 +0000 (14:57 +0100)
Kill 2 bugs with one patch

| insserv.c:997:5: note: each undeclared identifier is reported only
once for each function it appears in
| insserv.c:997:15: error: expected ';' before 'char'
|      extension char buf[strlen(myname)+2+strlen(fmt)+1];
|                ^
| insserv.c: In function 'main':
| insserv.c:2379:5: error: 'extension' undeclared (first use in this
function)
|      extension char * argr[argc];
|      ^
| insserv.c:2379:15: error: expected ';' before 'char'
|      extension char * argr[argc];
|                ^
| insserv.c:2401:2: error: 'argr' undeclared (first use in this
function)
|   argr[c] = (char*)0;
|   ^

Change-Id: I36b7fb9e8baeda5a7cc252da10c0527401248226
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/insserv/files/161_bts777914_fix_undeclared_identifier.patch [new file with mode: 0644]
meta/recipes-devtools/insserv/insserv_1.14.0.bb

diff --git a/meta/recipes-devtools/insserv/files/161_bts777914_fix_undeclared_identifier.patch b/meta/recipes-devtools/insserv/files/161_bts777914_fix_undeclared_identifier.patch
new file mode 100644 (file)
index 0000000..6ee9532
--- /dev/null
@@ -0,0 +1,36 @@
+Upstream-Status: Pending
+
+insserv (1.14.0-5.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * moving definition of "extension" in listing.h outside of 
+    an if loop with condition related to __STDC_VERSION__.
+  * I observed that this gets build with gcc-4.9.2, as for gcc 
+    __STDC_VERSION__ is not defined.
+  * I got these error while using clang to build this package.
+  * I tested it with clang-3.5(__STDC_VERSION__ 199901L) and
+    clang 3.7(__STDC_VERSION__ 201112L) and getting same error 
+    described in in Bug #777914.
+
+ -- Mohit Bhakkad <mohit.bhakkad@gmail.com>  Sat, 04 Apr 2015 19:14:48 +0000
+
+ insserv (1.14.0-5) unstable; urgency=low
+   * Add +mountall-bootclean to $local_fs virtual facility definition in
+Index: insserv-1.14.0/listing.h
+===================================================================
+--- insserv-1.14.0.orig/listing.h
++++ insserv-1.14.0/listing.h
+@@ -47,9 +47,9 @@ typedef unsigned int uint;
+ # ifndef  asm
+ #  define asm                 __asm__
+ # endif
+-# ifndef  extension
+-#  define extension           __extension__
+-# endif
++#endif
++#ifndef  extension
++# define extension             __extension__
+ #endif
+ #ifndef  attribute
+ # define attribute(attr)      __attribute__(attr)
index 4a33e169127905a2ee1c205d6f5d676ed1817856..b66e98b49f14360aab48012af205d12e93efe924 100644 (file)
@@ -11,6 +11,7 @@ PR = "r1"
 SRC_URI = "ftp://ftp.suse.com/pub/projects/init/${BPN}-${PV}.tar.bz2 \
            file://makefile.patch \
            file://disable_runtests.patch \
+           file://161_bts777914_fix_undeclared_identifier.patch \
            file://insserv.conf \
            file://run-ptest \
 "