chiark / gitweb /
headers: use __inline__ instead of inline
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Mar 2016 18:41:49 +0000 (13:41 -0500)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Alternate-Keywords.html#Alternate-Keywords
recommends __inline__ over inline in ANSI C compatible headers.
Tested with gcc-5.3 and clang-3.7.

https://bugzilla.redhat.com/show_bug.cgi?id=1316964

src/systemd/_sd-common.h
src/systemd/sd-id128.h

index 2d4e1f26e1ebfe92c55fb56af52573f7fd221127..3bb886be75959100f12c32e62f067927bbe070c0 100644 (file)
@@ -74,7 +74,7 @@
 #endif
 
 #define _SD_DEFINE_POINTER_CLEANUP_FUNC(type, func)             \
-        static inline void func##p(type **p) {                  \
+        static __inline__ void func##p(type **p) {              \
                 if (*p)                                         \
                         func(*p);                               \
         }                                                       \
index a3bf5897b81d0cefadfe5c8a288032a53c7e11a7..4dff0b9b811df5d61cea402907a77294aaedb556 100644 (file)
@@ -100,11 +100,11 @@ int sd_id128_get_boot(sd_id128_t *ret);
                 ((x).bytes[15] & 15) >= 10 ? 'a' + ((x).bytes[15] & 15) - 10 : '0' + ((x).bytes[15] & 15), \
                 0 })
 
-_sd_pure_ static inline int sd_id128_equal(sd_id128_t a, sd_id128_t b) {
+_sd_pure_ static __inline__ int sd_id128_equal(sd_id128_t a, sd_id128_t b) {
         return memcmp(&a, &b, 16) == 0;
 }
 
-_sd_pure_ static inline int sd_id128_is_null(sd_id128_t a) {
+_sd_pure_ static __inline__ int sd_id128_is_null(sd_id128_t a) {
         return a.qwords[0] == 0 && a.qwords[1] == 0;
 }