Correct fix for zero-length arrays in gcc-3.0
authorDavid Schleef <ds@schleef.org>
Fri, 30 Aug 2002 22:50:53 +0000 (22:50 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 30 Aug 2002 22:50:53 +0000 (22:50 +0000)
include/linux/comedidev.h

index 192c68dc5d48deae8492ced05f94398f375f0291..3d8f19991c8f4cf7e02cc6728ed66c2e4dff3cc8 100644 (file)
@@ -284,9 +284,15 @@ extern comedi_lrange range_unknown;
 
 #define range_digital          range_unipolar5
 
+#if __GNUC__ >= 3
+#define GCC_ZERO_LENGTH_ARRAY
+#else
+#define GCC_ZERO_LENGTH_ARRAY 0
+#endif
+
 struct comedi_lrange_struct{
        int length;
-       comedi_krange range[];
+       comedi_krange range[ GCC_ZERO_LENGTH_ARRAY ];
 };