You have probably already seen this but ... .

I have an old Solaris 8 box with the Studio 11 compiler suite installed.  'cc' 
complains about a "char x[0];" declaration in a struct definition in the 
"safe.c" file. Below is the patch that I applied to fix the problem.

Question - is the "x[0]" construct limited to 'gcc' only or do other compilers 
accept it?

-- Thanks,
--   Paul Townsend 

diff -u patch-2.7.5/src/safe.c.orig patch-2.7.5/src/safe.c
--- patch-2.7.5/src/safe.c.orig 2015-06-06 02:42:28.963559000 -0400
+++ patch-2.7.5/src/safe.c      2015-06-06 16:45:22.952711000 -0400
@@ -261,7 +261,7 @@
 struct symlink {
   struct symlink *prev;
   const char *path;
-  char buffer[0];
+  char buffer[];
 };
 
 static void push_symlink (struct symlink **stack, struct symlink *symlink)

Reply via email to