lkml.org 
[lkml]   [2015]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v15 03/25] tools subcmd: Add missing NORETURN define for parse-options.h
Date
parse-options.h uses the NORETURN macro without defining it.  perf
doesn't see a build error because it defines the macro in util.h before
including parse-options.h. But any other tool including it will see an
error.

Define the macro in parse-options.h (if not already defined) so that
other tools can include it.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
tools/lib/subcmd/parse-options.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h
index 13a2cc1..d60cab2 100644
--- a/tools/lib/subcmd/parse-options.h
+++ b/tools/lib/subcmd/parse-options.h
@@ -4,6 +4,10 @@
#include <stdbool.h>
#include <stdint.h>

+#ifndef NORETURN
+#define NORETURN __attribute__((__noreturn__))
+#endif
+
enum parse_opt_type {
/* special types */
OPTION_END,
--
2.4.3


\
 
 \ /
  Last update: 2015-12-18 14:21    [W:0.272 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site