commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 23/26: Fix build with gcc 5


From: Samuel Thibault
Subject: [hurd] 23/26: Fix build with gcc 5
Date: Tue, 22 Sep 2015 21:51:49 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch dde
in repository hurd.

commit 172911318104984ddb9f7b4e25a2ee1646228d63
Author: Samuel Thibault <address@hidden>
Date:   Tue Sep 22 03:16:13 2015 +0200

    Fix build with gcc 5
    
    * libdde_linux26/contrib/include/linux/compiler-gcc5.h: New file, copy of
    compiler-gcc4.h with no version test.
    * libdde_linux26/contrib/include/linux/inotify.h: Turn extern inline into
    static inline.
    * libdde_linux26/contrib/include/linux/tty_driver.h: Likewise.
---
 .../contrib/include/linux/compiler-gcc5.h          | 25 ++++++++++++++++++++++
 libdde_linux26/contrib/include/linux/inotify.h     |  4 ++--
 libdde_linux26/contrib/include/linux/tty_driver.h  |  2 +-
 3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/libdde_linux26/contrib/include/linux/compiler-gcc5.h 
b/libdde_linux26/contrib/include/linux/compiler-gcc5.h
new file mode 100644
index 0000000..34c5861
--- /dev/null
+++ b/libdde_linux26/contrib/include/linux/compiler-gcc5.h
@@ -0,0 +1,25 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-gcc5.h> directly, include 
<linux/compiler.h> instead."
+#endif
+
+#define __used                 __attribute__((__used__))
+#define __must_check           __attribute__((warn_unused_result))
+#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
+#define __always_inline                inline __attribute__((always_inline))
+
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
+/* Mark functions as cold. gcc will assume any path leading to a call
+   to them will be unlikely.  This means a lot of manual unlikely()s
+   are unnecessary now for any paths leading to the usual suspects
+   like BUG(), printk(), panic() etc. [but let's keep them for now for
+   older compilers]
+
+   gcc also has a __attribute__((__hot__)) to move hot functions into
+   a special section, but I don't see any sense in this right now in
+   the kernel context */
+#define __cold                 __attribute__((__cold__))
diff --git a/libdde_linux26/contrib/include/linux/inotify.h 
b/libdde_linux26/contrib/include/linux/inotify.h
index 37ea289..782fd29 100644
--- a/libdde_linux26/contrib/include/linux/inotify.h
+++ b/libdde_linux26/contrib/include/linux/inotify.h
@@ -230,12 +230,12 @@ static inline void put_inotify_watch(struct inotify_watch 
*watch)
 {
 }
 
-extern inline int pin_inotify_watch(struct inotify_watch *watch)
+static inline int pin_inotify_watch(struct inotify_watch *watch)
 {
        return 0;
 }
 
-extern inline void unpin_inotify_watch(struct inotify_watch *watch)
+static inline void unpin_inotify_watch(struct inotify_watch *watch)
 {
 }
 
diff --git a/libdde_linux26/contrib/include/linux/tty_driver.h 
b/libdde_linux26/contrib/include/linux/tty_driver.h
index 08e0883..8f359e0 100644
--- a/libdde_linux26/contrib/include/linux/tty_driver.h
+++ b/libdde_linux26/contrib/include/linux/tty_driver.h
@@ -310,7 +310,7 @@ extern void tty_set_operations(struct tty_driver *driver,
 extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
 
 extern void tty_driver_kref_put(struct tty_driver *driver);
-extern inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
+static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
 {
        kref_get(&d->kref);
        return d;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]