From 14aed863caf36b58efa80d9b6579d2c188b0b208 Mon Sep 17 00:00:00 2001 From: murray Date: Sun, 7 Apr 2002 10:27:24 +0000 Subject: GCC >= 3 and C99 handle zero-length arrays differently than older versions of GCC. With this change, sysinstall compiles and works fine with GCC 3.1 or 2.95. --- usr.sbin/sysinstall/sysinstall.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr.sbin/sysinstall') diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index a0b26a5..6858500 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -214,7 +214,13 @@ typedef struct _dmenu { char *prompt; /* Our prompt */ char *helpline; /* Line of help at bottom */ char *helpfile; /* Help file for "F1" */ +#if (__STDC_VERSION__ >= 199901L) || (__GNUC__ >= 3) + dialogMenuItem items[]; /* Array of menu items */ +#elif __GNUC__ dialogMenuItem items[0]; /* Array of menu items */ +#else +#error "Create hack for C89 and K&R compilers." +#endif } DMenu; /* An rc.conf variable */ -- cgit v1.1