libunibreak: add missing __has_attribute definitions for old compilers
authorRomain Naour <romain.naour@smile.fr>
Tue, 16 Apr 2019 19:33:44 +0000 (21:33 +0200)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 30 May 2019 08:17:50 +0000 (17:17 +0900)
__has_attribute has been introduced with gcc 5 [1].

[1] https://www.gnu.org/software/gcc/gcc-5/changes.html

Fixes:
http://autobuild.buildroot.net/results/64ab825048fac1654b0d0698740ddf857fcc0afa/build-end.log
Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
src/static_libs/libunibreak/wordbreak.c

index 017e0fd..50c830c 100644 (file)
@@ -209,6 +209,9 @@ static void set_wordbreaks(
                 posLast = posCur;
                 break;
             }
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
 #if __has_attribute(fallthrough)
            __attribute__((fallthrough));
 #endif
@@ -325,6 +328,9 @@ static void set_wordbreaks(
                 wbcSeqStart = wbcCur;
                 posLast = posCur;
             }
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
 #if __has_attribute(fallthrough)
            __attribute__((fallthrough));
 #endif