diff options
Diffstat (limited to 'meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch')
-rw-r--r-- | meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch b/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch new file mode 100644 index 0000000000..2a9bb352b5 --- /dev/null +++ b/meta/recipes-extended/lighttpd/lighttpd/0002-define-__BEGIN_DECLS-__END_DECLS-if-needed.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From c1466f3620f608e4def4b8853c4e2bc6d9a19646 Mon Sep 17 00:00:00 2001 | ||
2 | From: Glenn Strauss <gstrauss@gluelogic.com> | ||
3 | Date: Mon, 4 Oct 2021 09:51:22 -0400 | ||
4 | Subject: [PATCH] define __BEGIN_DECLS, __END_DECLS if needed | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
8 | --- | ||
9 | src/first.h | 16 ++++++++++++++++ | ||
10 | 1 file changed, 16 insertions(+) | ||
11 | |||
12 | diff --git a/src/first.h b/src/first.h | ||
13 | index df747ba..9d0428a 100644 | ||
14 | --- a/src/first.h | ||
15 | +++ b/src/first.h | ||
16 | @@ -39,6 +39,22 @@ | ||
17 | #include <sys/types.h> | ||
18 | #include <stddef.h> | ||
19 | |||
20 | +#ifndef __BEGIN_DECLS | ||
21 | +#ifdef __cplusplus | ||
22 | +#define __BEGIN_DECLS extern "C" { | ||
23 | +#else | ||
24 | +#define __BEGIN_DECLS | ||
25 | +#endif | ||
26 | +#endif | ||
27 | + | ||
28 | +#ifndef __END_DECLS | ||
29 | +#ifdef __cplusplus | ||
30 | +#define __END_DECLS } | ||
31 | +#else | ||
32 | +#define __END_DECLS | ||
33 | +#endif | ||
34 | +#endif | ||
35 | + | ||
36 | #if defined HAVE_STDINT_H | ||
37 | # include <stdint.h> | ||
38 | #elif defined HAVE_INTTYPES_H | ||