Some versions of SUN's cc have a bug that causes them to complain about
a redeclared identifier when you use a function declaration that takes a
struct with a FAM and this struct has only been declared but not yet
defined.
IOW, this will fail:
struct foo;
void bar(struct foo *);
struct foo {
int v;
long *a[];
};
void bar(struct foo *foo) {} // SUN cc bug strikes here
So when we detect a SUN cc, we use an array size of 1 to workaround that
bug.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
---
Guido, could you please test this patch?
I have no clue which versions of SUN's cc are affected, so I simply enabled
the workaround for all versions. Someone with more knowledge about that
should probably limit the check to only do that for the broken versions.
git-compat-util.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index ede9408..c3ff4b4 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -6,6 +6,8 @@
#ifndef FLEX_ARRAY
#if defined(__GNUC__) && (__GNUC__ < 3)
#define FLEX_ARRAY 0
+#elif defined(sun) || defined(__SUN__)
+#define FLEX_ARRAY 1
#else
#define FLEX_ARRAY /* empty */
#endif
--
1.5.3.5.643.g40e25
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Jesper Krogh | Re: Linux 2.6.26-rc4 |
| Borislav Petkov | 2.6.23-rc1: no setup signature found... |
| Dmitry Torokhov | 2.6.27-rc8+ - first impressions |
| Andi Kleen | Re: 2.6.27-rc1: critical thermal shutdown on thinkpad x60 |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| Martin Langhoff | parsecvs repository moved... |
| Johan Herland | [PATCH 3/6] git-fsck: Do thorough verification of tag objects. |
| Nigel Magnay | crlf with git-svn driving me nuts... |
| Joaquin Herrero | ssh hangs from Ubunty Feisty 7.04 to OpenBSD |
| Marco Peereboom | Re: Real men don't attack straw men |
| Pieter Verberne | Remove escape characters from file |
| L. V. Lammert | Re: About Xen: maybe a reiterative question but .. |
| Krzysztof Oledzki | Error: an inet prefix is expected rather than "0/0". |
| Evgeniy Polyakov | [resend take 2 4/4] DST Makefile/Kconfig files. |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Bruce Allen | e1000 full-duplex TCP performance well below wire speed |
| USB statistics | 29 minutes ago | Linux kernel |
| Block Sub System query | 4 hours ago | Linux kernel |
| kernel module to intercept socket creation | 5 hours ago | Linux kernel |
| Image size changing during each build | 6 hours ago | Linux kernel |
| Soft lock bug | 10 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 17 hours ago | Linux kernel |
| Question on swap as ramdisk partition | 19 hours ago | Linux kernel |
| serial driver xmit problem | 1 day ago | Linux kernel |
| Generic Netlink subsytem | 1 day ago | Linux kernel |
| 'Report spam filter error' page broken | 1 day ago | KernelTrap Suggestions and Feedback |
